log: add common helper log_set_target_and_open()
quite often we want to set a log target and immediately open it. Add a common helper for that.
This commit is contained in:
@@ -86,8 +86,7 @@ int bus_property_set_log_target(
|
||||
return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid log target '%s'", t);
|
||||
|
||||
log_info("Setting log target to %s.", log_target_to_string(target));
|
||||
log_set_target(target);
|
||||
log_open();
|
||||
log_set_target_and_open(target);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user