File: debug.c

package info (click to toggle)
contactsd 1.4.15-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,392 kB
  • sloc: cpp: 8,862; ansic: 3,793; sh: 361; xml: 75; python: 22; makefile: 13
file content (31 lines) | stat: -rw-r--r-- 621 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
 * Copyright © 2011 Collabora Ltd. <http://www.collabora.co.uk/>
 * Copyright © 2011 Nokia Corporation
 *
 * Copying and distribution of this file, with or without modification,
 * are permitted in any medium without royalty provided the copyright
 * notice and this notice are preserved.
 */

#include "debug.h"

static gboolean enabled = FALSE;

void
_test_log (const gchar *format, ...)
{
  if (enabled)
    {
      va_list args;
      va_start (args, format);
      g_logv ("test", G_LOG_LEVEL_DEBUG, format, args);
      va_end (args);
    }
}

void
test_debug_enable (gboolean enable)
{
  enabled = enable;
}