Yuriy Tseretyan
739d3469bc
Chore: Update ConcreteLogger to implement gokit Logger interface ( #51599 )
2022-06-29 18:16:10 -04:00
Sofia Papagiannaki
84e2e1ec8e
Log: Fix text logging for unsupported types ( #51306 )
...
* Fix text log for unsupported types
* Apply suggestions from code review
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2022-06-23 13:24:26 +02:00
Kat Yang
31630edf0c
Chore: Remove Wrapf ( #50128 )
...
* Chore: Remove Wrapf
* Remove all Wrapf refs
* Remove last Wrapf ref
* Fix lint errors
* Remove Wrap and Wrapf definitions
* Remove unnecessary colon
2022-06-06 22:30:31 +02:00
ying-jeanne
4e3f53f106
Chore: Make logger mutable for regression test ( #49146 )
...
* Log: make logger mutable
* remove flag from public configuration
2022-05-18 17:04:52 +02:00
Emil Tullstedt
51ff2b8c58
Logging: Unify logging fakes ( #48822 )
2022-05-06 17:44:22 +02:00
ying-jeanne
f62c261900
fix terminal format ( #47718 )
2022-04-13 17:37:56 +02:00
ying-jeanne
06d2d44031
put the default logger format and feature toggle to fallback to old logger ( #47584 )
2022-04-13 11:02:19 +02:00
ying-jeanne
03ba91e8a4
add feature toggle with new format ( #47336 )
...
* add feature toggle with new format
* fix some comments ❤️
* Update pkg/infra/log/term/terminal_logger.go
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2022-04-11 18:50:29 +02:00
ying-jeanne
c525db9cd8
fallback to the v8 logging behavior ( #47353 )
2022-04-05 20:15:41 +02:00
Marcus Efraimsson
659cf17e10
Logging: Fix syslog messages should be sent with correct severity ( #47209 )
2022-04-04 12:51:14 +02:00
Marcus Efraimsson
b4346a5613
Logging: Fixes filtering logs based on gokitlog levels ( #47195 )
2022-04-04 12:36:17 +02:00
Marcus Efraimsson
16db1ad46d
API: Fixes request logging middleware to include userId, orgId, uname ( #47183 )
...
Fixes #47006
2022-04-01 13:24:39 +02:00
Emil Tullstedt
7bc821baf2
Logger: Use specified format for file logger ( #46970 )
...
Fixes #45941
2022-03-26 11:40:08 +01:00
gotjosh
b1e6f7126a
Logging: Helper to create NopLogger ( #46376 )
2022-03-09 17:03:58 +00:00
Marcus Efraimsson
ca311bf94f
Logging: Fix server hangs when using log.WithSuffix ( #45213 )
...
Fixes a problem where server hangs if setting
GF_DATABASE_LOG_QUERIES=true.
Ref #44925
2022-02-10 12:51:51 +01:00
Marcus Efraimsson
2082eeb72f
Logging: Fix so that filters can contain commented lines ( #45159 )
...
Fixes log filters that contains comments should not be enabled
2022-02-10 09:52:37 +01:00
Marcus Efraimsson
05ea825c76
Chore: Logging improvements ( #44925 )
...
Fixing a couple bugs, adds some tests and hopefully decrease
lock contention when logging.
Switching from using sync.RWMutex to go-kit SwapLogger.
Fixes bug when creating a new logger from an existing one that
screwed up the keyvals and/or lost the logger name.
Ref #44681
2022-02-07 16:00:08 +01:00
bolshoytoster
7f2d3055d8
Logging: Fix don't return an error trying to initialize the file logger ( #42952 )
...
Fixes #42897
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-02-03 18:17:25 +01:00
Marcus Efraimsson
bc7e55d99b
Chore: Fix log filters ( #44681 )
2022-02-03 23:20:02 +08:00
Marcus Efraimsson
a23900c4ba
CodeQL: Ignore go/log-injection for terminal logger ( #44481 )
2022-01-27 19:01:59 +01:00
Ryan McKinley
3c334cd8ba
Logger: avoid panic when time is a string (not fmt.Stringer) ( #44497 )
2022-01-26 13:17:42 -08:00
Marcus Efraimsson
50fabe8a87
Chore: Implements log15 terminal logger ( #44447 )
...
Nicer development/terminal output based on log15 terminal logger.
2022-01-26 12:19:43 +01:00
Yuriy Tseretyan
8114f6b065
Use stack trace context in XORM trace logger ( #43780 )
...
* add caller and stack Valuer functions
* Add WithPrefix and WithSuffix similar to what go-kit offers
* replace New with just `with`. Remove filter wrapper because the first argument of the context argument is not logger but additional context.
* update Xorm logger to use custom depth to display the datastore code instead of xorm
2022-01-13 13:30:28 -05:00
ying-jeanne
a8eef45a44
Logger migration from log15 to gokit/log ( #41636 )
...
* migrate log15 to gokit/log
* fix console log
* update some unittest
* fix all unittest
* fix the build
* Update pkg/infra/log/log.go
Co-authored-by: Yuriy Tseretyan <tceretian@gmail.com>
* general type vector
* correct the level key
Co-authored-by: Yuriy Tseretyan <tceretian@gmail.com>
2022-01-06 22:28:05 +08:00
ying-jeanne
54de1078c8
remove the global log error/warn etc functions ( #41404 )
...
* remove the global log error/warn etc functions and use request context logger whenever possible
2021-11-08 17:56:56 +01:00
ying-jeanne
cedbddafe3
removing the log function after enterprise repo update ( #41197 )
2021-11-02 22:39:55 +08:00
ying-jeanne
681218275e
remove crit and trace ( #40320 )
2021-10-26 17:36:24 +02:00
Serge Zaitsev
643c7fa0cb
Chore: update all +build statements ( #38782 )
2021-09-01 17:38:56 +03:00
Arve Knudsen
7394c98d38
MuxWriter: Handle error for already closed file ( #31119 )
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-02-11 10:34:51 +01:00
Arve Knudsen
c2cad26ca9
Chore: Disable default golangci-lint filter ( #29751 )
...
* Disable default golangci-lint filter
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Chore: Fix linter warnings
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-12-15 09:32:06 +01:00
Arve Knudsen
f2b7fbc32a
Chore: Check errors from Close calls ( #29562 )
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-12-03 10:11:14 +01:00
Arve Knudsen
3c229c6bee
Log: Use os.Open to open file for reading ( #29483 )
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-12-01 09:28:18 +01:00
Arve Knudsen
294770f411
Chore: Handle wrapped errors ( #29223 )
...
* Chore: Handle wrapped errors
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2020-11-19 13:34:28 +01:00
Arve Knudsen
52c154a221
Backend: Rename variables for style conformance ( #29097 )
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-17 17:09:14 +01:00
Arve Knudsen
3d3a7cbba8
Chore: Fix staticcheck issues ( #28860 )
...
* Chore: Fix issues reported by staticcheck
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Undo changes
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Chore: Fix issues reported by staticcheck
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix test
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix test
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-05 13:07:06 +01:00
Arve Knudsen
dff84f6a31
Chore: Remove dead code ( #28664 )
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-05 11:00:00 +01:00
Arve Knudsen
a5d9196a53
Chore/fix lint issues ( #27704 )
...
* Chore: Fix linting issues
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-09-22 16:22:19 +02:00
Emil Tullstedt
b68634fbb4
Tests: Batch of GoConvey to Testify conversions ( #27008 )
2020-08-14 14:43:25 +02:00
Arve Knudsen
e6e5cc6e80
Chore: Simplify generic OAuth code ( #26779 )
...
* Generic OAuth: Simplify
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Rename test variables for consistency
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-08-04 18:28:53 +02:00
Arve Knudsen
4c56eb3991
Chore: Enable goprintffuncname and nakedret linters ( #26376 )
...
* Chore: Enable goprintffuncname linter
* Chore: Enable nakedret linter
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-07-23 08:14:39 +02:00
Arve Knudsen
41d432b5ae
Chore: Enable whitespace linter ( #25903 )
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-07-06 20:17:28 +02:00
Arve Knudsen
b1af28122b
Server: Fail when unable to create log directory ( #20804 )
2019-12-02 15:40:32 +01:00
Arve Knudsen
7349a6b96c
pkg/infra: Check errors ( #19705 )
...
* pkg/infra: Check errors
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* pkg/infra: Handle errors
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Update pkg/infra/usagestats/usage_stats.go
Co-Authored-By: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2019-10-10 16:42:11 +02:00
zhulongcheng
2fff8f77dc
move log package to /infra ( #17023 )
...
ref #14679
Signed-off-by: zhulongcheng <zhulongcheng.me@gmail.com>
2019-05-13 08:45:54 +02:00