Commit Graph

17 Commits

Author SHA1 Message Date
Dave Protasowski 8535fcc248
gofumpt the repo (#3067)
* gofumpt the repo

* don't prefix numbers with 0 - otherwise they're octal
2024-06-25 07:27:07 +00:00
Pierangelo Di Pilato a850b9e047
Use t.Setenv instead of os.Setenv in tests (#2454)
Go 1.17 introduced a new handy API for setting env vars scoped for
a single test so we can avoid the hard to read set and reset env
loops.

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
2022-03-10 10:00:48 -08:00
Ian Milligan a536174bdf
Use zapdriver config as base zap config (#1773)
* Use zapdriver config as base zap config

Changes the encoding of the timestamp, severity, and message fields to
be parseable by Stackdriver.

* Wrap zap core with zapdriver core

Automatically adds labels and source location to log messages.
2020-12-03 11:31:09 -08:00
Victor Agababov 5394608723
Add proper cased function to deprecate the old one (#1848)
* Add proper cased function to deprecate the old one

Json -> JSON
2 less linter errors!

* cmt
2020-10-26 14:18:41 -07:00
Victor Agababov a371418524
v2 (#1754) 2020-09-29 13:18:29 -07:00
Victor Agababov 7aa8743aaa
Some minor test coverage improvements and code flow improvements (#1649)
This way it's shorter and easier to read and also cover those super-important functions with
unit tests, since why not? :)
2020-08-24 15:46:47 -07:00
Victor Agababov 1ceb875570
Fix \" escaping and other nits in the pkg (#1339) 2020-05-16 09:36:02 -07:00
Victor Agababov 0eed424fa4
Cleanup the logging CM handling. (#1223)
Raise test coverage, improve code flow, etc.
2020-04-14 16:31:46 -07:00
Antoine Cotten ec5f5148b8 Do not override log level if component is undefined in logging config (#780)
* Do not override log level if component undefined

* review(vagababov): Remove empty line
2019-10-20 14:14:22 -07:00
mattmoor-sockpuppet a07e7def0a golang format tools (#659)
Produced via:
  `gofmt -s -w $(find -path './vendor' -prune -o -type f -name '*.go' -print))`
  `goimports -w $(find -name '*.go' | grep -v vendor)`
/assign mattmoor
2019-09-11 07:12:29 -07:00
Ignacio Cano c56cedc7e7 Serializing/Deserializing Logging and Metrics configs (#656)
* source stats reporter... should be used by well-behaved sources

* public fields

* moving serialization/deserialization of metrics and logging maps to pkg

* nits

* adding UT

* same order

* updates

* sock-puppet

* unregistration problem?

* removing base64 encoding

* removing TODO

* comments after review

* removing the other constants
2019-09-10 12:36:29 -07:00
mattmoor-sockpuppet 17ec1ed50d golang format tools (#437)
Produced via:
  `gofmt -s -w $(find -path './vendor' -prune -o -type f -name '*.go' -print))`
  `goimports -w $(find -name '*.go' | grep -v vendor)`
2019-05-31 11:11:32 -07:00
Adam Harwayne 67d95db076 Logging config parses all components, rather than just a list passed in. (#436)
* Logging config pares all components, rather than just a list passed in.

* Simplify the prefix checking logic.

* PR comment - ignore empty string.

* Unit test.
2019-05-30 15:23:31 -07:00
Matt Moore 77b7b13190 Move the defaulting for ConfigMap into our logging library. (#258)
Progress towards: https://github.com/knative/serving/issues/2668
2019-01-30 21:59:37 -08:00
Shashwathi 9a6f5abda8 Use more verbose error msg (#31) 2018-07-31 09:38:37 -07:00
Matt Moore 9d1975b29f Drop the fixed list of `knative/serving` components from logging. (#22) 2018-07-27 10:14:36 -07:00
Matt Moore 8b7b2d7cfb Move the logging packages from serving into pkg. (#21) 2018-07-27 09:53:35 -07:00