tree-wide: enable colorized logging for daemons when run in console

It may be useful when debugging daemons.
This commit is contained in:
Yu Watanabe
2021-02-01 01:13:44 +09:00
parent 74189020eb
commit d2acb93dc5
72 changed files with 72 additions and 85 deletions
+1 -13
View File
@@ -1456,19 +1456,7 @@ int log_dup_console(void) {
return 0;
}
void log_setup_service(void) {
/* Sets up logging the way it is most appropriate for running a program as a service. Note that using this
* doesn't make the binary unsuitable for invocation on the command line, as log output will still go to the
* terminal if invoked interactively. */
log_set_target(LOG_TARGET_AUTO);
log_parse_environment();
(void) log_open();
}
void log_setup_cli(void) {
/* Sets up logging the way it is most appropriate for running a program as a CLI utility. */
void log_setup(void) {
log_set_target(LOG_TARGET_AUTO);
log_parse_environment();
(void) log_open();