2 * Copyright (C) 1997-2010 Andre Noll <maan@systemlinux.org>
4 * Licensed under the GPL v2. For licencing details see COPYING.
7 /** debug loglevel, gets really noisy */
9 /** still noisy, but won't fill your disk */
11 /** normal, but significant event */
13 /** unexpected event that can be handled */
15 /** unhandled error condition */
17 /** system might be unreliable */
19 /** last message before exit */
22 /** Log messages with lower priority than that will not be compiled in. */
23 #define COMPILE_TIME_LOGLEVEL 0
26 #if DEBUG > COMPILE_TIME_LOGLEVEL
27 #define DSS_DEBUG_LOG(f,...) dss_log(DEBUG, "%s: " f, __FUNCTION__, ## __VA_ARGS__)
29 #define DSS_DEBUG_LOG(...) do {;} while (0)
32 #if INFO > COMPILE_TIME_LOGLEVEL
33 #define DSS_INFO_LOG(f,...) dss_log(INFO, "%s: " f, __FUNCTION__, ## __VA_ARGS__)
35 #define DSS_INFO_LOG(...) do {;} while (0)
38 #if NOTICE > COMPILE_TIME_LOGLEVEL
39 #define DSS_NOTICE_LOG(f,...) dss_log(NOTICE, "%s: " f, __FUNCTION__, ## __VA_ARGS__)
41 #define DSS_NOTICE_LOG(...) do {;} while (0)
44 #if WARNING > COMPILE_TIME_LOGLEVEL
45 #define DSS_WARNING_LOG(f,...) dss_log(WARNING, "%s: " f, __FUNCTION__, ## __VA_ARGS__)
47 #define DSS_WARNING_LOG(...) do {;} while (0)
50 #if ERROR > COMPILE_TIME_LOGLEVEL
51 #define DSS_ERROR_LOG(f,...) dss_log(ERROR, "%s: " f, __FUNCTION__, ## __VA_ARGS__)
53 #define DSS_ERROR_LOG(...) do {;} while (0)
56 #if CRIT > COMPILE_TIME_LOGLEVEL
57 #define DSS_CRIT_LOG(f,...) dss_log(CRIT, "%s: " f, __FUNCTION__, ## __VA_ARGS__)
59 #define DSS_CRIT_LOG(...) do {;} while (0)
62 #if EMERG > COMPILE_TIME_LOGLEVEL
63 #define DSS_EMERG_LOG(f,...) dss_log(EMERG, "%s: " f, __FUNCTION__, ## __VA_ARGS__)
65 #define DSS_EMERG_LOG(...)