summaryrefslogtreecommitdiff
path: root/lib/vlog.c
diff options
context:
space:
mode:
authorAnsis Atteka <aatteka@nicira.com>2015-09-15 19:40:47 -0700
committerAnsis Atteka <aatteka@nicira.com>2015-09-29 17:24:14 -0700
commit195360dcdca6ad930608ecad6345fefd0c994e9b (patch)
treeca00cb59d17d88dd3656cb40bdd0b77891e50c28 /lib/vlog.c
parent08258b507a5f8c0b3c415c0ae512e70139aff685 (diff)
downloadopenvswitch-195360dcdca6ad930608ecad6345fefd0c994e9b.tar.gz
vlog: deprecate --syslog-target argument
Commit fe089c0d1e18 ("vlog: abstract out interface to syslog daemon") introduced --syslog-method flag that supersedes --syslog-target flag by: 1. making logging format configurable 2. letting daemon to also talk over UNIX domain socket (this is handy when local rsyslog daemon is running in different network namespace on the same host) Signed-off-by: Ansis Atteka <aatteka@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'lib/vlog.c')
-rw-r--r--lib/vlog.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/vlog.c b/lib/vlog.c
index 29ba62082..da31e6f0f 100644
--- a/lib/vlog.c
+++ b/lib/vlog.c
@@ -706,6 +706,7 @@ vlog_init(void)
if (ovsthread_once_start(&once)) {
long long int now;
int facility;
+ bool print_syslog_target_deprecation;
/* Do initialization work that needs to be done before any logging
* occurs. We want to keep this really minimal because any attempt to
@@ -740,6 +741,15 @@ vlog_init(void)
0, INT_MAX, vlog_disable_rate_limit, NULL);
unixctl_command_register("vlog/reopen", "", 0, 0,
vlog_unixctl_reopen, NULL);
+
+ ovs_rwlock_rdlock(&pattern_rwlock);
+ print_syslog_target_deprecation = syslog_fd >= 0;
+ ovs_rwlock_unlock(&pattern_rwlock);
+
+ if (print_syslog_target_deprecation) {
+ VLOG_WARN("--syslog-target flag is deprecated, use "
+ "--syslog-method instead");
+ }
}
}