crowdsec/pkg/types
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
..
appsec_event.go lint: style, autofix (#3354) 2024-12-05 10:40:48 +01:00
constants.go lint: style, autofix (#3354) 2024-12-05 10:40:48 +01:00
datasource.go trim pkg/types: move DataSet/GetData to pkg/cwhub, removed unused Clone function (#2271) 2023-06-08 16:49:51 +02:00
event.go loop performance optimizations / 1 (#3313) 2024-12-05 18:04:26 +01:00
event_test.go lint: style, autofix (#3354) 2024-12-05 10:40:48 +01:00
getfstype.go lint: style, autofix (#3354) 2024-12-05 10:40:48 +01:00
getfstype_freebsd.go db config: don't exit setup if can't detect fs, improve detection for freebsd (#2963) 2024-04-25 11:11:57 +02:00
getfstype_openbsd.go implement GetFSType on openbsd with the correct statfs struct member (#3191) 2024-08-27 12:41:53 +02:00
getfstype_windows.go Auto detect if reading logs or storing sqlite db on a network share (#2241) 2024-03-07 14:04:50 +01:00
ip.go refact pkg/database: clean up code and error messages (#3263) 2024-12-19 17:01:16 +01:00
ip_test.go refactor pkg/leakybucket (#3371) 2024-12-20 14:33:24 +01:00
line.go Refactor Acquisition Interface (#773) 2021-06-11 09:53:53 +02:00
queue.go refactor: prefer logrus.WithField over WithFields with a single param (#3087) 2024-06-20 10:38:23 +02:00
utils.go Add possibility to configure log format #799 (#2941) 2024-12-23 11:08:33 +01:00