]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/debug.c
Stop accepting attributes in collections (Issue #5630)
[thirdparty/cups.git] / cups / debug.c
index a52fbd1031e713490935a39a0a01467983a6d38c..6b3914ed5110b9600b2b7dee7ab3fc9ed03ad914 100644 (file)
@@ -1,9 +1,10 @@
 /*
  * Debugging functions for CUPS.
  *
- * Copyright 2008-2015 by Apple Inc.
+ * Copyright © 2008-2018 by Apple Inc.
  *
- * Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
+ * Licensed under Apache License v2.0.  See the file "LICENSE" for more
+ * information.
  */
 
 /*
@@ -11,8 +12,9 @@
  */
 
 #include "cups-private.h"
+#include "debug-internal.h"
 #include "thread-private.h"
-#ifdef WIN32
+#ifdef _WIN32
 #  include <sys/timeb.h>
 #  include <time.h>
 #  include <io.h>
@@ -30,11 +32,12 @@ _cups_gettimeofday(struct timeval *tv,      /* I  - Timeval struct */
 #else
 #  include <sys/time.h>
 #  include <unistd.h>
-#endif /* WIN32 */
+#endif /* _WIN32 */
 #include <regex.h>
 #include <fcntl.h>
 
 
+#ifdef DEBUG
 /*
  * Globals...
  */
@@ -45,7 +48,6 @@ int                   _cups_debug_level = 1;
                                        /* Log level (0 to 9) */
 
 
-#ifdef DEBUG
 /*
  * Local globals...
  */
@@ -312,6 +314,24 @@ _cups_debug_set(const char *logfile,       /* I - Log file or NULL */
 
   _cupsMutexUnlock(&debug_init_mutex);
 }
+
+
+#else
+/*
+ * '_cups_debug_set()' - Enable or disable debug logging.
+ */
+
+void
+_cups_debug_set(const char *logfile,   /* I - Log file or NULL */
+               const char *level,      /* I - Log level or NULL */
+               const char *filter,     /* I - Filter string or NULL */
+               int        force)       /* I - Force initialization */
+{
+  (void)logfile;
+  (void)level;
+  (void)filter;
+  (void)force;
+}
 #endif /* DEBUG */