Files
NetworkManager/src/platform/tests/monitor.c
Thomas Haller ca8e40e1dc platform/tests: use "nm-test-utils.h" in "monitor.c"
This gives us a way to externally configure the logging level like:

  NMTST_DEBUG=log-level=TRACE ./src/platform/tests/monitor
2015-11-01 17:28:09 +01:00

33 lines
537 B
C

#include "config.h"
#include <stdlib.h>
#include <syslog.h>
#include "nm-default.h"
#include "nm-linux-platform.h"
#include "nm-test-utils.h"
NMTST_DEFINE ();
int
main (int argc, char **argv)
{
GMainLoop *loop;
if (!g_getenv ("G_MESSAGES_DEBUG"))
g_setenv ("G_MESSAGES_DEBUG", "all", TRUE);
nmtst_init_with_logging (&argc, &argv, "DEBUG", "ALL");
nm_log_info (LOGD_PLATFORM, "platform monitor start");
loop = g_main_loop_new (NULL, FALSE);
nm_linux_platform_setup ();
g_main_loop_run (loop);
return EXIT_SUCCESS;
}