Commit graph

5 commits

Author SHA1 Message Date
Jude DSouza 9201cef1b7 Enforce log level filter for log files 2019-04-11 10:04:28 -06:00
Siva Prasad 59dea9a31f
Adds a new command line flag -log-file for file based logging. (#4581)
* Added log-file flag to capture Consul logs in a user specified file

* Refactored code.

* Refactored code. Added flags to rotate logs based on bytes and duration

* Added the flags for log file and log rotation on the webpage

* Fixed TestSantize from failing due to the addition of 3 flags

* Introduced changes : mutex, data-dir log writes, rotation logic

* Added test for logfile and updated the default log destination for docs

* Log name now uses UnixNano

* TestLogFile is now uses t.Parallel()

* Removed unnecessary int64Val function

* Updated docs to reflect default log name for log-file

* No longer writes to data-dir and adds .log if the filename has no extension
2018-08-29 16:56:58 -04:00
Frank Schroeder 9de4555c0c golint: Untangle if blocks with return in else 2017-04-25 09:26:13 -07:00
Seth Vargo dc47ebb082
Fix vet issues 2017-03-23 20:29:31 -04:00
James Phillips ea95e8f40d Moves logger setup into its own package. (#2471)
* Moves logger setup into its own package.

* Removes a stray regex mark in the test locator.
2016-11-03 21:14:56 -07:00