Commit graph

41 commits

Author SHA1 Message Date
Jiri Pirko
23836e8146 core: add support for team device
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
2013-08-15 10:54:15 -05:00
Dan Williams
3c6d789c62 logging: add log domain for D-Bus PropertiesChanged signal stuff
Otherwise it really clutters up the CORE logging when debugging is
enabled.
2013-08-06 16:29:09 -05:00
Thomas Haller
a853b3bd23 core: minor code cleanup to use preprocessor constants
Use preprocessor constants in nm_logging_all_domains_to_string instead
of hard coded values for the special logging domain names.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-08-06 13:48:02 -05:00
Colin Walters
2269b708ac main+logging: Allow early logging before config files
The new setup phase goes like this:

- main()
- parse command line options
- logging is configured, targeting stdout/stderr
- ...other stuff...
- do or do not daemonize, depending on commandline option and config files
- Call openlog() - further log messages go to syslog (and potentially
  stderr as well, if the -d option was specified so we use LOG_PERROR).

Basically, this allows us to log messages about config file parsing
and such, which *greatly* helps with debugging.
2013-06-24 15:48:53 -05:00
Dan Winship
8d44136dce main: add --debug, fix logging under systemd
When run with --no-daemon, NM used to duplicate all syslog output to
stderr, for ease of debugging. But this meant it had to tell systemd
to ignore stderr, so you wouldn't get duplicated log entries. But that
meant we lost error messages that didn't go through nm_log. (eg,
g_warning()s and g_return_if_fail()s).

Fix this by making --no-daemon no longer duplicate syslog output to
stderr, and removing the "StandardError=null" from the systemd service
file. To get the old behavior, you can use --debug instead of
--no-daemon.

https://bugzilla.gnome.org/show_bug.cgi?id=700550
2013-05-21 09:30:09 -03:00
Dan Winship
8bb9ee8d3b config: fix documentation of --log-domains
The list of log domains in the --log-domains documentation had gotten
out of date. Fix this by adding nm_logging_all_domain_to_string()
(and, for completeness, nm_logging_all_levels_to_string()), and use
those to fill in the help string.
2013-04-03 10:23:47 -04:00
Dan Williams
fab66119dc logging: add BRIDGE log domain 2013-02-04 10:37:46 -06:00
Pavel Šimerda
1495853e01 logging: add LOGD_PLATFORM 2013-01-24 19:48:01 +01:00
Colin Walters
ae627737d5 Remove SIGSEGV/SIGFPE etc. handling
Modern operating systems come with systemwide "crash catching"
facilities; for example, the Linux kernel can now pipe core dumps out
to userspace, and programs like "systemd-coredump" and "abrt" record
these.

In this model, it's actively counterproductive for individual
processes to catch SIGSEGV because:

1) Trying to unwind from inside the process after arbitrary
   corruption is destined to fail.
2) It hides the fact that a crash happened at all - my OS test
   framework wants to know if any process crashed, and I don't
   want to guess by running regexps against /var/log/Xorg.0.log
   or whatever.

Signed-off-by: Colin Walters <walters@verbum.org>

https://bugzilla.gnome.org/show_bug.cgi?id=692032
2013-01-22 12:49:48 -05:00
Jiří Klimeš
7b10b4d468 logging: add 'DEFAULT' logging domain
It contains logging domains that are active by default. It allows users
to set default domains back easily (after they changed them).

And fix formatting of "} else if".
2013-01-09 16:47:49 +01:00
Jiří Klimeš
1eb9c5e352 logging: add "VLAN" log domain 2012-11-07 13:58:47 +01:00
Jiří Klimeš
8437b07581 logging: add "BOND" log domain 2012-11-07 13:58:47 +01:00
Jiří Klimeš
8fbd24c9b4 logging: add new combined log domains
ALL  - for setting all log domains
DHCP - for DHCP4 combined with DHCP6
IP   - for IP4 combined with IP6
2012-11-07 13:58:47 +01:00
Dan Winship
a13d4e9d3d build: fix build after addition of new warnings 2012-08-01 09:48:03 -04:00
Pantelis Koukousoulas
d125296eb1 adsl: initial PPPoE support for ADSL devices 2012-05-18 15:42:56 -05:00
Dan Winship
839eab5564 Use glib-mkenums to generate enum types
Rather than generating enum classes by hand (and complaining in each
file that "this should really be standard"), use glib-mkenums.

Unfortunately, we need a very new version of glib-mkenums in order to
deal with NM's naming conventions and to fix a few other bugs, so just
import that into the source tree temporarily.

Also, to simplify the use of glib-mkenums, import Makefile.glib from
https://bugzilla.gnome.org/654395.

To avoid having to run glib-mkenums for every subdirectory of src/,
add a new "generated" directory, and put the generated enums files
there.

Finally, use Makefile.glib for marshallers too, and generate separate
ones for libnm-glib and NetworkManager.
2012-02-15 11:42:15 -05:00
Peter Korsgaard
cbf72aeb34 core: only include execinfo.h if crashtrace support is enabled
On systems without backtrace suport (E.G. uClibc depending on config),
execinfo.h might not be available, breaking the build.

Fix it by only including it if enabled.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-01-05 11:50:28 -06:00
Dan Williams
b2eaf7228e firewall: add firewall log domain and use it in firewall code 2011-12-06 16:51:17 -06:00
Dan Winship
5366c3d6d4 wired: split NMDeviceWired out of NMDeviceEthernet and add NMDeviceInfiniband 2011-12-02 13:09:16 -06:00
David Rothlisberger
bcef119ffd build: add --disable-crashtrace option
Disables GNU backtrace extensions.
2011-10-05 17:01:16 -05:00
Dan Williams
6dae3c2f33 ppp: enable pppd debug logging when PPP log domain is enabled for debuggin
Instead of just with the old environment variable.  This means we'll
log pppd debug output when the log level is changed via the D-Bus
interface now too.
2011-05-19 13:31:52 -05:00
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
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
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
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
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
Renamed from src/nm-logging.c (Browse further)