Commit Graph

26 Commits

Author SHA1 Message Date
Dan Williams
e7be98260e logging: clean up logging macros and helper
There were two specific problems with the logging macros:

1) the existing varargs usage didn't allow for format string checking,
which is bad, since it could make logging segfault if the arguments
don't match the format string

2) it didn't allow logging usage without wrapping {}, ie this didn't work:

if (foo)
   nm_log_dbg (...)

blah blah

Fix all that by using the varargs stuff correctly.
2011-03-19 12:42:29 -05:00
Kjartan Maraas
6d0d302916 build: do the right thing with config.h (bgo #644664)
1) it shouldn't be included in headers
2) it should be the first thing included in source files
3) it's needed for getting translation right
2011-03-14 01:01:22 -05:00
Dan Williams
6d344a43e9 Merge remote-tracking branch 'origin/rm-userset'
There; it's merged.  Yay!
2011-02-12 22:51:12 -06:00
Ozan Çağlayan
9049358579 logging: don't print extraneous newline in syslog 2011-02-09 10:52:28 -06:00
Dan Williams
f9ceafd4a1 Merge remote branch 'origin/master' into rm-userset 2011-01-12 15:46:37 -06:00
Dan Williams
76c7d2f95c logging: add WiMAX log domain 2011-01-02 22:16:22 -06:00
Dan Williams
66291ec204 logging: LOGD_USER_SET -> LOGD_AGENTS 2010-12-10 12:36:02 -06:00
Dan Williams
cf7cc2492d logging: LOGD_SYS_SET -> LOGD_SETTINGS 2010-12-10 12:32:22 -06:00
Dan Williams
b9a919784e logging: add accessor for log level 2010-08-08 01:38:52 -05:00
Dan Williams
79df93ce33 logging: log PID with syslog messages 2010-05-04 15:03:59 -07:00
Dan Williams
defaee09e5 logging: correctly print new logging level and domains on changes
Previously the input would simply be printed, but if you're not
changing either the level or domains (ie sending "") then the
unchanged logging domains wouldn't be printed, only "".
2010-05-04 12:06:00 -07:00
Dan Williams
fbcdc95a21 logging: logger needs -ldl for dladdr() 2010-04-19 16:56:50 -07:00
Jiří Klimeš
9000c68839 logging: change default level to be true INFO level
Using LOGL_INFO | LOGL_WARN | LOGL_ERR as default to log the same values
as though "--log-level=INFO" were specified.
2010-04-12 17:55:44 +02:00
Jiří Klimeš
9b9331f53d logging: fix log level flag values (LOGL_*)
0x00000000 caused that ERR level (nm_log_err()) gets never logged.
2010-04-12 17:48:37 +02:00
Dan Williams
78f7ef1115 logging: use INFO level for debug messages
By default most distros won't log debug messages to syslog; but we
want them logged when the user explicitly requests them via the logging
API and config options in NM.  Half the point of doing more logging
was to make it easier for users to get logs out of NM, and having
to edit syslog configuration makes it all pointless.
2010-04-08 14:49:56 -07:00
Dan Williams
0d8174dfa6 logging: fix build on 32-bit platforms 2010-04-08 13:29:07 -07:00
Dan Williams
02002ef9d1 logging: add D-Bus method to change logging 2010-04-08 08:56:17 -07:00
Dan Williams
4e5cfab478 logging: fix multiple log level handling
Ensure messages are only printed in the format their log level wants.
2010-04-07 14:43:32 -07:00
Dan Williams
637a912545 logging: fix log domain parsing 2010-04-07 14:08:34 -07:00
Dan Williams
0d0503f21a logging: fix loc/func confusion 2010-04-07 13:40:27 -07:00
Dan Williams
e7877a0036 logging: adjust default domains to match previous log verbosity 2010-04-07 13:36:47 -07:00
Dan Williams
f354bd3d9f logging: allow OLPC mesh logging to be used 2010-04-07 13:33:49 -07:00
Dan Williams
75fa7b804d logging: add OLPC mesh log domain 2010-04-07 11:13:25 -07:00
Dan Williams
8e7a25114b logging: clarify some log domains 2010-04-07 10:55:30 -07:00
Dan Williams
ecbb8af10a logging: add DHCP meta-domain 2010-04-06 18:06:36 -07:00
Dan Williams
a00a6e5d87 logging: move logging into its own subdir
Some stuff we build (the DHCP manager) gets built independently
so that we can use it for unit tests.  For that, we need to build
the logging bits separately too, since the independent DHCP
library can't use them if they are embedded in NM.
2010-04-06 17:39:57 -07:00