From 30157821f77b2a5bac25908c76840011fd6a328c Mon Sep 17 00:00:00 2001 From: Richard Cochran Date: Sun, 16 Aug 2015 14:24:39 +0200 Subject: [PATCH] ptp4l: set print levels earlier. Now we have debug messages in the configuration code. Therefore set up the print levels immediately after parsing the command line and the file, so that those messages have a chance to be seen. Signed-off-by: Richard Cochran --- ptp4l.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ptp4l.c b/ptp4l.c index 8ca49c0..cc94f66 100644 --- a/ptp4l.c +++ b/ptp4l.c @@ -203,6 +203,11 @@ int main(int argc, char *argv[]) return c; } + print_set_progname(progname); + print_set_verbose(config_get_int(cfg, NULL, "verbose")); + print_set_syslog(config_get_int(cfg, NULL, "use_syslog")); + print_set_level(config_get_int(cfg, NULL, "logging_level")); + assume_two_step = config_get_int(cfg, NULL, "assume_two_step"); sk_check_fupsync = config_get_int(cfg, NULL, "check_fup_sync"); sk_tx_timeout = config_get_int(cfg, NULL, "tx_timestamp_timeout"); @@ -239,11 +244,6 @@ int main(int argc, char *argv[]) config_set_int(cfg, "sanity_freq_limit", 0); } - print_set_progname(progname); - print_set_verbose(config_get_int(cfg, NULL, "verbose")); - print_set_syslog(config_get_int(cfg, NULL, "use_syslog")); - print_set_level(config_get_int(cfg, NULL, "logging_level")); - if (STAILQ_EMPTY(&cfg_settings.interfaces)) { fprintf(stderr, "no interface specified\n"); usage(progname);