generators: introduce a common implementation for the log setup boilerplate
This commit is contained in:
@@ -498,3 +498,10 @@ int generator_hook_up_growfs(
|
||||
|
||||
return generator_add_symlink(dir, where_unit, "wants", unit);
|
||||
}
|
||||
|
||||
void log_setup_generator(void) {
|
||||
log_set_prohibit_ipc(true);
|
||||
log_set_target(LOG_TARGET_AUTO);
|
||||
log_parse_environment();
|
||||
log_open();
|
||||
}
|
||||
|
||||
@@ -47,3 +47,5 @@ int generator_hook_up_growfs(
|
||||
const char *dir,
|
||||
const char *where,
|
||||
const char *target);
|
||||
|
||||
void log_setup_generator(void);
|
||||
|
||||
Reference in New Issue
Block a user