Commit graph

24 commits

Author SHA1 Message Date
Dan Helfman
5752373009 When color output is disabled (explicitly or implicitly), don't prefix each log line with the log level (#863). 2024-05-11 22:40:13 -07:00
Dan Helfman
f8f6560502 Fix handling of the NO_COLOR environment variable to ignore an empty value (#835). 2024-03-13 09:35:19 -07:00
shivansh02
458d157e62 NO_COLOR set to any value returns false 2024-03-05 00:15:52 +05:30
shivansh02
40c3a28620 support for NO_COLOR env var 2024-03-04 18:21:28 +05:30
Dan Helfman
f4744826fe When the "--json" flag is given, suppress console escape codes so as not to interfere with JSON output (#827). 2024-02-11 17:44:43 -08:00
Dan Helfman
ac1e1a9407 Simplify logging logic (#665). 2023-09-29 14:16:47 -07:00
Soumik Dutta
a7f81d538d nit changes
- help strings in borgmatic commands
- test fixes in test_logger and test_borgmatic

Signed-off-by: Soumik Dutta <shalearkane@gmail.com>
2023-05-29 01:09:00 +05:30
Soumik Dutta
3d41ed3a34 add test to check that log_file is disabled
if logging is disabled

Signed-off-by: Soumik Dutta <shalearkane@gmail.com>
2023-05-26 09:58:53 +05:30
Soumik Dutta
f98d07e8d8 fix logger test
Signed-off-by: Soumik Dutta <shalearkane@gmail.com>
2023-05-26 08:57:12 +05:30
Soumik Dutta
24be6272ed add test for logger
Signed-off-by: Soumik Dutta <shalearkane@gmail.com>
2023-05-26 08:57:12 +05:30
Dan Helfman
7e6bee84b0 Add "--log-file-format" flag for customizing the log message format (#658). 2023-04-02 23:06:36 -07:00
Dan Helfman
c657764367 Fix logs that interfere with JSON output by making warnings go to stderr instead of stdout (#602). 2022-12-02 12:12:10 -08:00
Dan Helfman
54d57e1349 Add test for #407: Fix syslog logging on FreeBSD. 2021-06-23 10:21:45 -07:00
Dan Helfman
14e5cfc8f8 Support piping "borgmatic list" output to grep. Retain colored output when piping/redirecting (#271). 2019-12-11 12:12:25 -08:00
Dan Helfman
0a9f4e8708 Reopen the file given by "--log-file" flag if an external program rotates the log file while borgmatic is running. 2019-11-12 16:13:25 -08:00
Dan Helfman
a9104ed090 Handle log file error more consistently with other error. Add --log-file-verbosity flag. Add docs. 2019-11-02 11:23:18 -07:00
palto42
26a1a3d1e0 test cases for logfile option 2019-11-02 14:34:16 +01:00
Dan Helfman
90595e9c18 Only log to syslog when run from a non-interactive console (e.g. a cron job). Related to #197. 2019-06-27 14:41:21 -07:00
Dan Helfman
74ac148747 Disable console color via "color" option in borgmatic configuration output section (#191). 2019-06-19 20:48:54 -07:00
Dan Helfman
b3aa6af859 Don't color syslog output (#197). 2019-06-17 11:53:08 -07:00
Dan Helfman
dc43c38e29 Complete test coverage for logging branch. 2019-06-13 11:11:42 -07:00
Dan Helfman
a13cc0ab17 More tests for colored logging. 2019-05-13 21:10:26 -07:00
Dan Helfman
620f9e64d6 A few more tests for new colored logging. 2019-05-13 20:49:20 -07:00
Luke Murphy
a621ce199a
Add tests for borgmatic.logger.to_bool 2019-05-13 13:40:23 +02:00