Index: uspace/lib/usb/include/usb/debug.h
===================================================================
--- uspace/lib/usb/include/usb/debug.h	(revision e0ba26baffd607ec49b265ed69bf2ca065e113c0)
+++ uspace/lib/usb/include/usb/debug.h	(revision 6028ec89ac2e9275afaecbdb501a72f05bbc6d3d)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2010 Vojtech Horky
+ * Copyright (c) 2010-2011 Vojtech Horky
  * All rights reserved.
  *
@@ -37,4 +37,5 @@
 #include <stdio.h>
 #include <usb/usb.h>
+#include <assert.h>
 
 void usb_dprintf(const char *tag, int level, const char *format, ...);
@@ -44,4 +45,39 @@
     const uint8_t *, size_t);
 
+/** Logging level. */
+typedef enum {
+    USB_LOG_LEVEL_FATAL,
+    USB_LOG_LEVEL_ERROR,
+    USB_LOG_LEVEL_WARNING,
+    USB_LOG_LEVEL_INFO,
+    USB_LOG_LEVEL_DEBUG,
+    USB_LOG_LEVEL_DEBUG2
+} usb_log_level_t;
+
+
+void usb_log_enable(usb_log_level_t, const char *);
+
+void usb_log_printf(usb_log_level_t, const char *, ...);
+
+#define usb_log_fatal(format, ...) \
+	usb_log_printf(USB_LOG_LEVEL_FATAL, format, ##__VA_ARGS__)
+
+#define usb_log_error(format, ...) \
+	usb_log_printf(USB_LOG_LEVEL_ERROR, format, ##__VA_ARGS__)
+
+#define usb_log_warning(format, ...) \
+	usb_log_printf(USB_LOG_LEVEL_WARNING, format, ##__VA_ARGS__)
+
+#define usb_log_info(format, ...) \
+	usb_log_printf(USB_LOG_LEVEL_INFO, format, ##__VA_ARGS__)
+
+#define usb_log_debug(format, ...) \
+	usb_log_printf(USB_LOG_LEVEL_DEBUG, format, ##__VA_ARGS__)
+
+#define usb_log_debug2(format, ...) \
+	usb_log_printf(USB_LOG_LEVEL_DEBUG2, format, ##__VA_ARGS__)
+
+
+
 #endif
 /**
