mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
log: open journal when cli program run in a service unit
Previously, cli programs like networkctl always use console for logging.
This commit is contained in:
@@ -1484,7 +1484,9 @@ void log_setup_service(void) {
|
||||
void log_setup_cli(void) {
|
||||
/* Sets up logging the way it is most appropriate for running a program as a CLI utility. */
|
||||
|
||||
log_show_color(true);
|
||||
log_set_target(LOG_TARGET_AUTO);
|
||||
log_parse_environment_cli();
|
||||
(void) log_open();
|
||||
if (log_on_console() && show_color < 0)
|
||||
log_show_color(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user