summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-02-15 18:13:46 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-02-17 02:26:22 -0500
commitb1e90ec515408aec2702522f6f68c4920b56375b (patch)
treea00ecbc44f5f762d064219fe0b4c71290cd7d364 /src/shared
parentfb4729006a7174472e8a435b0887e532cd6217fc (diff)
Pass log config from systemd to systemd-shutdown
If PID 1 debug logging is enabled, it is nice to keep those settings when switching to systemd-shutdown binary, independently of whether this was done through /proc/cmdline options, or through runtime manipulations.
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/log.c8
-rw-r--r--src/shared/log.h2
2 files changed, 10 insertions, 0 deletions
diff --git a/src/shared/log.c b/src/shared/log.c
index ee20921f78..3e48b3ccc2 100644
--- a/src/shared/log.c
+++ b/src/shared/log.c
@@ -927,10 +927,18 @@ void log_show_color(bool b) {
show_color = b;
}
+bool log_get_show_color(void) {
+ return show_color;
+}
+
void log_show_location(bool b) {
show_location = b;
}
+bool log_get_show_location(void) {
+ return show_location;
+}
+
int log_show_color_from_string(const char *e) {
int t;
diff --git a/src/shared/log.h b/src/shared/log.h
index 6a0f6735c5..794af7be6a 100644
--- a/src/shared/log.h
+++ b/src/shared/log.h
@@ -52,7 +52,9 @@ int log_set_target_from_string(const char *e);
int log_set_max_level_from_string(const char *e);
void log_show_color(bool b);
+bool log_get_show_color(void) _pure_;
void log_show_location(bool b);
+bool log_get_show_location(void) _pure_;
int log_show_color_from_string(const char *e);
int log_show_location_from_string(const char *e);