From 2040933d74ff9a3a78e1139b80c58f565d4067c8 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Mon, 27 Aug 2012 19:20:41 +0200 Subject: [PATCH] Configure logging facility sooner. Error messages from initialization were missing. Signed-off-by: Miroslav Lichvar --- ptp4l.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ptp4l.c b/ptp4l.c index ea1ca90..464f991 100644 --- a/ptp4l.c +++ b/ptp4l.c @@ -227,6 +227,10 @@ int main(int argc, char *argv[]) return -1; } + print_set_verbose(cfg_settings.verbose); + print_set_syslog(cfg_settings.use_syslog); + print_set_level(cfg_settings.print_level); + for (i = 0; i < nports; i++) { if (config_create_interface(ports[i], &cfg_settings) < 0) { fprintf(stderr, "too many interfaces\n"); @@ -263,10 +267,6 @@ int main(int argc, char *argv[]) return -1; } - print_set_verbose(cfg_settings.verbose); - print_set_syslog(cfg_settings.use_syslog); - print_set_level(cfg_settings.print_level); - clock = clock_create(phc_index, iface, cfg_settings.nports, *timestamping, ds); if (!clock) {