crowdsec/pkg/apiserver
victoredvardsson 466f39b880
Add possibility to configure log format #799 (#2941)
* make it possible to enable json log

* fix

* fix typo

* fix typo

* fix typo

* fix typo

* fix typo

* fix typo

* Add error handling

* Add log_format to default config

* Fix syntax error in if statement

* Fix typo

* Fix typo

* Fix some typos and change naming from native to text, makes more sense

* Set same timestamp format for json logging

* Fix formatting

* Move in if statement under previous

* Fix some formatting that got messed up

* Default to text formatter, if log_format is not configured.

* defining logFormatter outside if statement so that log.SetFormatter(logFormatter) is not undefined when function is called

* Add variables that were undefined

* Argument were missing when calling SetDefaultLoggerConfig function

* Fix order of arguments passed

* Fix order of arguments passed

* Fix typo

* Implicit log_format = "text"

* functional test

* ignore log_format in FatalHook

* make it possible to enable json log

* fix

* fix typo

* fix typo

* fix typo

* fix typo

* fix typo

* fix typo

* Add error handling

* Add log_format to default config

* Fix syntax error in if statement

* Fix typo

* Fix typo

* Fix some typos and change naming from native to text, makes more sense

* Set same timestamp format for json logging

* Fix formatting

* Move in if statement under previous

* Fix some formatting that got messed up

* Default to text formatter, if log_format is not configured.

* defining logFormatter outside if statement so that log.SetFormatter(logFormatter) is not undefined when function is called

* Add variables that were undefined

* Argument were missing when calling SetDefaultLoggerConfig function

* Fix order of arguments passed

* Fix order of arguments passed

* Fix typo

* Implicit log_format = "text"

* functional test

* ignore log_format in FatalHook

* lint

* fix func test

* lint

* remove < > characters from log

---------

Co-authored-by: Victor Edvardsson <victor.edvardsson@loopia.se>
Co-authored-by: marco <marco@crowdsec.net>
Co-authored-by: Thibault "bui" Koechlin <thibault@crowdsec.net>
2024-12-23 11:08:33 +01:00
..
controllers refact pkg/database: clean up code and error messages (#3263) 2024-12-19 17:01:16 +01:00
middlewares/v1 lint: style, autofix (#3354) 2024-12-05 10:40:48 +01:00
tests Fix #1552 (#1569) 2022-06-22 10:29:02 +02:00
alerts_test.go refactor pkg/leakybucket (#3371) 2024-12-20 14:33:24 +01:00
api_key_test.go Allow bouncers to share API keys (#3323) 2024-11-19 14:47:59 +01:00
apic.go lint: style, autofix (#3354) 2024-12-05 10:40:48 +01:00
apic_metrics.go better handle error when sending usage metrics (#3333) 2024-11-18 11:21:30 +01:00
apic_metrics_test.go context propagation: apic, unit tests (#3271) 2024-10-03 14:51:53 +02:00
apic_test.go Add explicit configuration for signals sharing and blocklists pull (#3277) 2024-11-08 15:11:09 +01:00
apiserver.go lint: enable more gocritic checks (#3363) 2024-12-13 15:42:55 +01:00
apiserver_test.go Add possibility to configure log format #799 (#2941) 2024-12-23 11:08:33 +01:00
decisions_test.go update golangci-lint to 1.62 (#3332) 2024-11-27 14:14:56 +01:00
heartbeat_test.go context propagation: apic, unit tests (#3271) 2024-10-03 14:51:53 +02:00
jwt_test.go update golangci-lint to 1.62 (#3332) 2024-11-27 14:14:56 +01:00
machines_test.go update golangci-lint to 1.62 (#3332) 2024-11-27 14:14:56 +01:00
papi.go context propagation: papi, loki (#3308) 2024-11-15 15:31:10 +01:00
papi_cmd.go context propagation: pkg/database/alerts (#3252) 2024-09-24 14:13:45 +02:00
usage_metrics_test.go context propagation: apic, unit tests (#3271) 2024-10-03 14:51:53 +02:00