* 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>
* tests: don't run crowdsec if not necessary
* make listen_uri report the random port number when 0 is requested
* move apiserver.getTLSAuthType() -> csconfig.TLSCfg.GetAuthType()
* move apiserver.isEnrolled() -> apiclient.ApiClient.IsEnrolled()
* extract function apiserver.recoverFromPanic()
* simplify and move APIServer.GetTLSConfig() -> TLSCfg.GetTLSConfig()
* moved TLSCfg type to csconfig/tls.go
* APIServer.InitController(): early return / happy path
* extract function apiserver.newGinLogger()
* lapi tests
* update unit test
* lint (testify)
* lint (whitespace, variable names)
* update docker tests
* apic: minor refactoring
* Add whitelist length check
If user configures the file but fails to define and actual whitelist we should check length to save allocs
* Init with length from file
* extract loop method from ApplyApicWhitelists
* pass pointer
* extract loop method updateBlocklist
---------
Co-authored-by: Laurence Jones <laurence.jones@live.co.uk>
* add infof command if err was nil
* Fix golint
* Make message more readable and log individual stats
* Missed a d
* Remove '
* simplify if/else logic
---------
Co-authored-by: Marco Mariani <marco@crowdsec.net>
* Allow to disable remote lapi registration
* Extract method and make it extendable as a generic middleware
* Change method name so it make sense to read abort remote if <config>
* golint
allow self-signed TLS encryption with user/pw auth
docker:
- remove defaults for certificate file locations
- new envvar INSECURE_SKIP_VERIFY
- register agent before TLS settings (cscli machine add removes them
from the credentials file)