VirtualBox

source: vbox/trunk/include/VBox/log.h@ 27558

Last change on this file since 27558 was 27558, checked in by vboxsync, 15 years ago

Storage: Simple driver for checking data integrity of virtual disks

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 13.5 KB
Line 
1/** @file
2 * VirtualBox - Logging.
3 */
4
5/*
6 * Copyright (C) 2006-2007 Sun Microsystems, Inc.
7 *
8 * This file is part of VirtualBox Open Source Edition (OSE), as
9 * available from http://www.virtualbox.org. This file is free software;
10 * you can redistribute it and/or modify it under the terms of the GNU
11 * General Public License (GPL) as published by the Free Software
12 * Foundation, in version 2 as it comes in the "COPYING" file of the
13 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15 *
16 * The contents of this file may alternatively be used under the terms
17 * of the Common Development and Distribution License Version 1.0
18 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
19 * VirtualBox OSE distribution, in which case the provisions of the
20 * CDDL are applicable instead of those of the GPL.
21 *
22 * You may elect to license modified versions of this file under the
23 * terms and conditions of either the GPL or the CDDL or both.
24 *
25 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
26 * Clara, CA 95054 USA or visit http://www.sun.com if you need
27 * additional information or have any questions.
28 */
29
30#ifndef ___VBox_log_h
31#define ___VBox_log_h
32
33/*
34 * Set the default loggroup.
35 */
36#ifndef LOG_GROUP
37# define LOG_GROUP LOG_GROUP_DEFAULT
38#endif
39
40#include <iprt/log.h>
41
42
43/** @defgroup grp_rt_vbox_log VirtualBox Logging
44 * @ingroup grp_rt_vbox
45 * @{
46 */
47
48/** PC port for debug output */
49#define RTLOG_DEBUG_PORT 0x504
50
51/**
52 * VirtualBox Logging Groups.
53 * (Remember to update LOGGROUP_NAMES!)
54 *
55 * @remark It should be pretty obvious, but just to have
56 * mentioned it, the values are sorted alphabetically (using the
57 * english alphabet) except for _DEFAULT which is always first.
58 *
59 * If anyone might be wondering what the alphabet looks like:
60 * A B C D E F G H I J K L M N O P Q R S T U V W X Y Z _
61 */
62typedef enum LOGGROUP
63{
64 /** The default VBox group. */
65 LOG_GROUP_DEFAULT = RTLOGGROUP_FIRST_USER,
66 /** CFGM group. */
67 LOG_GROUP_CFGM,
68 /** CPUM group. */
69 LOG_GROUP_CPUM,
70 /** CSAM group. */
71 LOG_GROUP_CSAM,
72 /** Debug Console group. */
73 LOG_GROUP_DBGC,
74 /** DBGF group. */
75 LOG_GROUP_DBGF,
76 /** DBGF info group. */
77 LOG_GROUP_DBGF_INFO,
78 /** The debugger gui. */
79 LOG_GROUP_DBGG,
80 /** Generic Device group. */
81 LOG_GROUP_DEV,
82 /** ACPI Device group. */
83 LOG_GROUP_DEV_ACPI,
84 /** AHCI Device group. */
85 LOG_GROUP_DEV_AHCI,
86 /** APIC Device group. */
87 LOG_GROUP_DEV_APIC,
88 /** Audio Device group. */
89 LOG_GROUP_DEV_AUDIO,
90 /** BusLogic SCSI host adapter group. */
91 LOG_GROUP_DEV_BUSLOGIC,
92 /** DMA Controller group. */
93 LOG_GROUP_DEV_DMA,
94 /** Gigabit Ethernet Device group. */
95 LOG_GROUP_DEV_E1000,
96 /** Extensible Firmware Interface Device group. */
97 LOG_GROUP_DEV_EFI,
98 /** Floppy Controller Device group. */
99 LOG_GROUP_DEV_FDC,
100 /** High Precision Event Timer Device group. */
101 LOG_GROUP_DEV_HPET,
102 /** IDE Device group. */
103 LOG_GROUP_DEV_IDE,
104 /** The internal networking IP stack Device group. */
105 LOG_GROUP_DEV_INIP,
106 /** KeyBoard Controller Device group. */
107 LOG_GROUP_DEV_KBD,
108 /** Low Pin Count Device group. */
109 LOG_GROUP_DEV_LPC,
110 /** LsiLogic SCSI controller Device group. */
111 LOG_GROUP_DEV_LSILOGICSCSI,
112 /** NE2000 Device group. */
113 LOG_GROUP_DEV_NE2000,
114 /** Parallel Device group */
115 LOG_GROUP_DEV_PARALLEL,
116 /** PC Device group. */
117 LOG_GROUP_DEV_PC,
118 /** PC Architecture Device group. */
119 LOG_GROUP_DEV_PC_ARCH,
120 /** PC BIOS Device group. */
121 LOG_GROUP_DEV_PC_BIOS,
122 /** PCI Device group. */
123 LOG_GROUP_DEV_PCI,
124 /** PCNet Device group. */
125 LOG_GROUP_DEV_PCNET,
126 /** PIC Device group. */
127 LOG_GROUP_DEV_PIC,
128 /** PIT Device group. */
129 LOG_GROUP_DEV_PIT,
130 /** RTC Device group. */
131 LOG_GROUP_DEV_RTC,
132 /** Serial Device group */
133 LOG_GROUP_DEV_SERIAL,
134 /** System Management Controller Device group. */
135 LOG_GROUP_DEV_SMC,
136 /** USB Device group. */
137 LOG_GROUP_DEV_USB,
138 /** VGA Device group. */
139 LOG_GROUP_DEV_VGA,
140 /** Virtio PCI Device group. */
141 LOG_GROUP_DEV_VIRTIO,
142 /** Virtio Network Device group. */
143 LOG_GROUP_DEV_VIRTIO_NET,
144 /** VMM Device group. */
145 LOG_GROUP_DEV_VMM,
146 /** VMM Device group for backdoor logging. */
147 LOG_GROUP_DEV_VMM_BACKDOOR,
148 /** VMM Device group for logging guest backdoor logging to stderr. */
149 LOG_GROUP_DEV_VMM_STDERR,
150 /** Disassembler group. */
151 LOG_GROUP_DIS,
152 /** Generic driver group. */
153 LOG_GROUP_DRV,
154 /** ACPI driver group */
155 LOG_GROUP_DRV_ACPI,
156 /** Block driver group. */
157 LOG_GROUP_DRV_BLOCK,
158 /** Char driver group. */
159 LOG_GROUP_DRV_CHAR,
160 /** Disk integrity driver group. */
161 LOG_GROUP_DRV_DISK_INTEGRITY,
162 /** Floppy media driver group. */
163 LOG_GROUP_DRV_FLOPPY,
164 /** Host Base block driver group. */
165 LOG_GROUP_DRV_HOST_BASE,
166 /** Host DVD block driver group. */
167 LOG_GROUP_DRV_HOST_DVD,
168 /** Host floppy block driver group. */
169 LOG_GROUP_DRV_HOST_FLOPPY,
170 /** Host Parallel Driver group */
171 LOG_GROUP_DRV_HOST_PARALLEL,
172 /** Host Serial Driver Group */
173 LOG_GROUP_DRV_HOST_SERIAL,
174 /** The internal networking transport driver group. */
175 LOG_GROUP_DRV_INTNET,
176 /** iSCSI Initiator driver group. */
177 LOG_GROUP_DRV_ISCSI,
178 /** iSCSI TCP transport driver group. */
179 LOG_GROUP_DRV_ISCSI_TRANSPORT_TCP,
180 /** ISO (CD/DVD) media driver group. */
181 LOG_GROUP_DRV_ISO,
182 /** Keyboard Queue driver group. */
183 LOG_GROUP_DRV_KBD_QUEUE,
184 /** lwIP IP stack driver group. */
185 LOG_GROUP_DRV_LWIP,
186 /** Mouse Queue driver group. */
187 LOG_GROUP_DRV_MOUSE_QUEUE,
188 /** Named Pipe stream driver group. */
189 LOG_GROUP_DRV_NAMEDPIPE,
190 /** NAT network transport driver group */
191 LOG_GROUP_DRV_NAT,
192 /** Raw image driver group */
193 LOG_GROUP_DRV_RAW_IMAGE,
194 /** SCSI driver group. */
195 LOG_GROUP_DRV_SCSI,
196 /** Host SCSI driver group. */
197 LOG_GROUP_DRV_SCSIHOST,
198 /** Async transport driver group */
199 LOG_GROUP_DRV_TRANSPORT_ASYNC,
200 /** TUN network transport driver group */
201 LOG_GROUP_DRV_TUN,
202 /** USB Proxy driver group. */
203 LOG_GROUP_DRV_USBPROXY,
204 /** VBoxHDD media driver group. */
205 LOG_GROUP_DRV_VBOXHDD,
206 /** VBox HDD container media driver group. */
207 LOG_GROUP_DRV_VD,
208 /** Virtual Switch transport driver group */
209 LOG_GROUP_DRV_VSWITCH,
210 /** VUSB driver group */
211 LOG_GROUP_DRV_VUSB,
212 /** EM group. */
213 LOG_GROUP_EM,
214 /** GMM group. */
215 LOG_GROUP_GMM,
216 /** GUI group. */
217 LOG_GROUP_GUI,
218 /** GVMM group. */
219 LOG_GROUP_GVMM,
220 /** HGCM group */
221 LOG_GROUP_HGCM,
222 /** HWACCM group. */
223 LOG_GROUP_HWACCM,
224 /** IOM group. */
225 LOG_GROUP_IOM,
226 /** XPCOM IPC group. */
227 LOG_GROUP_IPC,
228 /** Main group. */
229 LOG_GROUP_MAIN,
230 /** Misc. group intended for external use only. */
231 LOG_GROUP_MISC,
232 /** MM group. */
233 LOG_GROUP_MM,
234 /** MM group. */
235 LOG_GROUP_MM_HEAP,
236 /** MM group. */
237 LOG_GROUP_MM_HYPER,
238 /** MM Hypervisor Heap group. */
239 LOG_GROUP_MM_HYPER_HEAP,
240 /** MM Physical/Ram group. */
241 LOG_GROUP_MM_PHYS,
242 /** MM Page pool group. */
243 LOG_GROUP_MM_POOL,
244 /** The NAT service group */
245 LOG_GROUP_NAT_SERVICE,
246 /** The network adaptor driver group. */
247 LOG_GROUP_NET_ADP_DRV,
248 /** The network filter driver group. */
249 LOG_GROUP_NET_FLT_DRV,
250 /** The common network service group */
251 LOG_GROUP_NET_SERVICE,
252 /** PATM group. */
253 LOG_GROUP_PATM,
254 /** PDM group. */
255 LOG_GROUP_PDM,
256 /** PDM Async completion group. */
257 LOG_GROUP_PDM_ASYNC_COMPLETION,
258 /** PDM Device group. */
259 LOG_GROUP_PDM_DEVICE,
260 /** PDM Driver group. */
261 LOG_GROUP_PDM_DRIVER,
262 /** PDM Loader group. */
263 LOG_GROUP_PDM_LDR,
264 /** PDM Loader group. */
265 LOG_GROUP_PDM_QUEUE,
266 /** PGM group. */
267 LOG_GROUP_PGM,
268 /** PGM physical group. */
269 LOG_GROUP_PGM_PHYS,
270 /** PGM physical access group. */
271 LOG_GROUP_PGM_PHYS_ACCESS,
272 /** PGM shadow page pool group. */
273 LOG_GROUP_PGM_POOL,
274 /** REM group. */
275 LOG_GROUP_REM,
276 /** REM disassembly handler group. */
277 LOG_GROUP_REM_DISAS,
278 /** REM access handler group. */
279 LOG_GROUP_REM_HANDLER,
280 /** REM I/O port access group. */
281 LOG_GROUP_REM_IOPORT,
282 /** REM MMIO access group. */
283 LOG_GROUP_REM_MMIO,
284 /** REM Printf. */
285 LOG_GROUP_REM_PRINTF,
286 /** REM running group. */
287 LOG_GROUP_REM_RUN,
288 /** SELM group. */
289 LOG_GROUP_SELM,
290 /** Shared clipboard host service group. */
291 LOG_GROUP_SHARED_CLIPBOARD,
292 /** Chromium OpenGL host service group. */
293 LOG_GROUP_SHARED_CROPENGL,
294 /** Shared folders host service group. */
295 LOG_GROUP_SHARED_FOLDERS,
296 /** OpenGL host service group. */
297 LOG_GROUP_SHARED_OPENGL,
298 /** The internal networking service group. */
299 LOG_GROUP_SRV_INTNET,
300 /** SSM group. */
301 LOG_GROUP_SSM,
302 /** STAM group. */
303 LOG_GROUP_STAM,
304 /** SUP group. */
305 LOG_GROUP_SUP,
306 /** SUPport driver group. */
307 LOG_GROUP_SUP_DRV,
308 /** TM group. */
309 LOG_GROUP_TM,
310 /** TRPM group. */
311 LOG_GROUP_TRPM,
312 /** USB driver group. */
313 LOG_GROUP_USB_DRV,
314 /** USBFilter group. */
315 LOG_GROUP_USB_FILTER,
316 /** MSD USB device group. */
317 LOG_GROUP_USB_MSD,
318 /** Generic virtual disk layer. */
319 LOG_GROUP_VD,
320 /** iSCSI virtual disk backend. */
321 LOG_GROUP_VD_ISCSI,
322 /** Raw virtual disk backend. */
323 LOG_GROUP_VD_RAW,
324 /** VDI virtual disk backend. */
325 LOG_GROUP_VD_VDI,
326 /** VHD virtual disk backend. */
327 LOG_GROUP_VD_VHD,
328 /** VMDK virtual disk backend. */
329 LOG_GROUP_VD_VMDK,
330 /** VM group. */
331 LOG_GROUP_VM,
332 /** VMM group. */
333 LOG_GROUP_VMM,
334 /** VRDP group */
335 LOG_GROUP_VRDP,
336 /** Webservice group. */
337 LOG_GROUP_WEBSERVICE
338 /* !!!ALPHABETICALLY!!! */
339} VBOX_LOGGROUP;
340
341
342/** @def VBOX_LOGGROUP_NAMES
343 * VirtualBox Logging group names.
344 *
345 * Must correspond 100% to LOGGROUP!
346 * Don't forget commas!
347 *
348 * @remark It should be pretty obvious, but just to have
349 * mentioned it, the values are sorted alphabetically (using the
350 * english alphabet) except for _DEFAULT which is always first.
351 *
352 * If anyone might be wondering what the alphabet looks like:
353 * a b c d e f g h i j k l m n o p q r s t u v w x y z
354 */
355#define VBOX_LOGGROUP_NAMES \
356{ \
357 RT_LOGGROUP_NAMES, \
358 "DEFAULT", \
359 "CFGM", \
360 "CPUM", \
361 "CSAM", \
362 "DBGC", \
363 "DBGF", \
364 "DBGF_INFO", \
365 "DBGG", \
366 "DEV", \
367 "DEV_ACPI", \
368 "DEV_AHCI", \
369 "DEV_APIC", \
370 "DEV_AUDIO", \
371 "DEV_BUSLOGIC", \
372 "DEV_DMA", \
373 "DEV_E1000", \
374 "DEV_EFI", \
375 "DEV_FDC", \
376 "DEV_HPET", \
377 "DEV_IDE", \
378 "DEV_INIP", \
379 "DEV_KBD", \
380 "DEV_LPC", \
381 "DEV_LSILOGICSCSI", \
382 "DEV_NE2000", \
383 "DEV_PARALLEL", \
384 "DEV_PC", \
385 "DEV_PC_ARCH", \
386 "DEV_PC_BIOS", \
387 "DEV_PCI", \
388 "DEV_PCNET", \
389 "DEV_PIC", \
390 "DEV_PIT", \
391 "DEV_RTC", \
392 "DEV_SERIAL", \
393 "DEV_SMC", \
394 "DEV_USB", \
395 "DEV_VGA", \
396 "DEV_VIRTIO", \
397 "DEV_VIRTIO_NET", \
398 "DEV_VMM", \
399 "DEV_VMM_BACKDOOR", \
400 "DEV_VMM_STDERR",\
401 "DIS", \
402 "DRV", \
403 "DRV_ACPI", \
404 "DRV_BLOCK", \
405 "DRV_CHAR", \
406 "DRV_DISK_INTEGRITY", \
407 "DRV_FLOPPY", \
408 "DRV_HOST_BASE", \
409 "DRV_HOST_DVD", \
410 "DRV_HOST_FLOPPY", \
411 "DRV_HOST_PARALLEL", \
412 "DRV_HOST_SERIAL", \
413 "DRV_INTNET", \
414 "DRV_ISCSI", \
415 "DRV_ISCSI_TRANSPORT_TCP", \
416 "DRV_ISO", \
417 "DRV_KBD_QUEUE", \
418 "DRV_LWIP", \
419 "DRV_MOUSE_QUEUE", \
420 "DRV_NAMEDPIPE", \
421 "DRV_NAT", \
422 "DRV_RAW_IMAGE", \
423 "DRV_SCSI", \
424 "DRV_SCSIHOST", \
425 "DRV_TRANSPORT_ASYNC", \
426 "DRV_TUN", \
427 "DRV_USBPROXY", \
428 "DRV_VBOXHDD", \
429 "DRV_VD", \
430 "DRV_VSWITCH", \
431 "DRV_VUSB", \
432 "EM", \
433 "GMM", \
434 "GUI", \
435 "GVMM", \
436 "HGCM", \
437 "HWACCM", \
438 "IOM", \
439 "IPC", \
440 "MAIN", \
441 "MISC", \
442 "MM", \
443 "MM_HEAP", \
444 "MM_HYPER", \
445 "MM_HYPER_HEAP",\
446 "MM_PHYS", \
447 "MM_POOL", \
448 "NAT_SERVICE", \
449 "NET_ADP_DRV", \
450 "NET_FLT_DRV", \
451 "NET_SERVICE", \
452 "PATM", \
453 "PDM", \
454 "PDM_ASYNC_COMPLETION", \
455 "PDM_DEVICE", \
456 "PDM_DRIVER", \
457 "PDM_LDR", \
458 "PDM_QUEUE", \
459 "PGM", \
460 "PGM_PHYS", \
461 "PGM_PHYS_ACCESS",\
462 "PGM_POOL", \
463 "REM", \
464 "REM_DISAS", \
465 "REM_HANDLER", \
466 "REM_IOPORT", \
467 "REM_MMIO", \
468 "REM_PRINTF", \
469 "REM_RUN", \
470 "SELM", \
471 "SHARED_CLIPBOARD",\
472 "SHARED_CROPENGL",\
473 "SHARED_FOLDERS",\
474 "SHARED_OPENGL",\
475 "SRV_INTNET", \
476 "SSM", \
477 "STAM", \
478 "SUP", \
479 "SUP_DRV", \
480 "TM", \
481 "TRPM", \
482 "USB_DRV", \
483 "USB_FILTER", \
484 "USB_MSD", \
485 "VD", \
486 "VD_ISCSI", \
487 "VD_RAW", \
488 "VD_VDI", \
489 "VD_VHD", \
490 "VD_VMDK", \
491 "VM", \
492 "VMM", \
493 "VRDP", \
494 "WEBSERVICE", \
495}
496
497/** @} */
498#endif
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette