VirtualBox

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

Last change on this file since 7581 was 7155, checked in by vboxsync, 17 years ago

Huge cleanup/error checking/logging improvement of the VMDK code. Converted incomplete block write allocate notification to error. Added missing methods to set/query last modification uuid for parent (in all existing format backends). Added logging groups for format backends.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 11.2 KB
Line 
1/** @file
2 * VirtualBox - Logging.
3 */
4
5/*
6 * Copyright (C) 2006-2007 innotek GmbH
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
26#ifndef ___VBox_log_h
27#define ___VBox_log_h
28
29/*
30 * Set the default loggroup.
31 */
32#ifndef LOG_GROUP
33# define LOG_GROUP LOG_GROUP_DEFAULT
34#endif
35
36#include <iprt/log.h>
37
38
39/** @defgroup grp_rt_vbox_log VirtualBox Logging
40 * @ingroup grp_rt_vbox
41 * @{
42 */
43
44/** PC port for debug output */
45#define RTLOG_DEBUG_PORT 0x504
46
47/**
48 * VirtualBox Logging Groups.
49 * (Remember to update LOGGROUP_NAMES!)
50 *
51 * @remark It should be pretty obvious, but just to have
52 * mentioned it, the values are sorted alphabetically (using the
53 * english alphabet) except for _DEFAULT which is always first.
54 *
55 * If anyone might be wondering what the alphabet looks like:
56 * 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 _
57 */
58typedef enum LOGGROUP
59{
60 /** The default VBox group. */
61 LOG_GROUP_DEFAULT = RTLOGGROUP_FIRST_USER,
62 /** CFGM group. */
63 LOG_GROUP_CFGM,
64 /** CPUM group. */
65 LOG_GROUP_CPUM,
66 /** CSAM group. */
67 LOG_GROUP_CSAM,
68 /** Debug Console group. */
69 LOG_GROUP_DBGC,
70 /** DBGF group. */
71 LOG_GROUP_DBGF,
72 /** DBGF info group. */
73 LOG_GROUP_DBGF_INFO,
74 /** The debugger gui. */
75 LOG_GROUP_DBGG,
76 /** Generic Device group. */
77 LOG_GROUP_DEV,
78 /** ACPI Device group. */
79 LOG_GROUP_DEV_ACPI,
80 /** AHCI Device group. */
81 LOG_GROUP_DEV_AHCI,
82 /** APIC Device group. */
83 LOG_GROUP_DEV_APIC,
84 /** Audio Device group. */
85 LOG_GROUP_DEV_AUDIO,
86 /** DMA Controller group. */
87 LOG_GROUP_DEV_DMA,
88 /** Gigabit Ethernet Device group. */
89 LOG_GROUP_DEV_E1000,
90 /** Floppy Controller Device group. */
91 LOG_GROUP_DEV_FDC,
92 /** IDE Device group. */
93 LOG_GROUP_DEV_IDE,
94 /** The internal networking IP stack Device group. */
95 LOG_GROUP_DEV_INIP,
96 /** KeyBoard Controller Device group. */
97 LOG_GROUP_DEV_KBD,
98 /** NE2000 Device group. */
99 LOG_GROUP_DEV_NE2000,
100 /** Parallel Device group */
101 LOG_GROUP_DEV_PARALLEL,
102 /** PC Device group. */
103 LOG_GROUP_DEV_PC,
104 /** PC Architecture Device group. */
105 LOG_GROUP_DEV_PC_ARCH,
106 /** PC BIOS Device group. */
107 LOG_GROUP_DEV_PC_BIOS,
108 /** PCI Device group. */
109 LOG_GROUP_DEV_PCI,
110 /** PCNet Device group. */
111 LOG_GROUP_DEV_PCNET,
112 /** PIC Device group. */
113 LOG_GROUP_DEV_PIC,
114 /** PIT Device group. */
115 LOG_GROUP_DEV_PIT,
116 /** RTC Device group. */
117 LOG_GROUP_DEV_RTC,
118 /** Serial Device group */
119 LOG_GROUP_DEV_SERIAL,
120 /** USB Device group. */
121 LOG_GROUP_DEV_USB,
122 /** VGA Device group. */
123 LOG_GROUP_DEV_VGA,
124 /** VMM Device group. */
125 LOG_GROUP_DEV_VMM,
126 /** VMM Device group for backdoor logging. */
127 LOG_GROUP_DEV_VMM_BACKDOOR,
128 /** VMM Device group for logging guest backdoor logging to stderr. */
129 LOG_GROUP_DEV_VMM_STDERR,
130 /** Disassembler group. */
131 LOG_GROUP_DIS,
132 /** Generic driver group. */
133 LOG_GROUP_DRV,
134 /** ACPI driver group */
135 LOG_GROUP_DRV_ACPI,
136 /** Block driver group. */
137 LOG_GROUP_DRV_BLOCK,
138 /** Char driver group. */
139 LOG_GROUP_DRV_CHAR,
140 /** Floppy media driver group. */
141 LOG_GROUP_DRV_FLOPPY,
142 /** Host Base block driver group. */
143 LOG_GROUP_DRV_HOST_BASE,
144 /** Host DVD block driver group. */
145 LOG_GROUP_DRV_HOST_DVD,
146 /** Host floppy block driver group. */
147 LOG_GROUP_DRV_HOST_FLOPPY,
148 /** Host Parallel Driver group */
149 LOG_GROUP_DRV_HOST_PARALLEL,
150 /** Host Serial Driver Group */
151 LOG_GROUP_DRV_HOST_SERIAL,
152 /** The internal networking transport driver group. */
153 LOG_GROUP_DRV_INTNET,
154 /** iSCSI Initiator driver group. */
155 LOG_GROUP_DRV_ISCSI,
156 /** iSCSI TCP transport driver group. */
157 LOG_GROUP_DRV_ISCSI_TRANSPORT_TCP,
158 /** ISO (CD/DVD) media driver group. */
159 LOG_GROUP_DRV_ISO,
160 /** Keyboard Queue driver group. */
161 LOG_GROUP_DRV_KBD_QUEUE,
162 /** lwIP IP stack driver group. */
163 LOG_GROUP_DRV_LWIP,
164 /** Mouse Queue driver group. */
165 LOG_GROUP_DRV_MOUSE_QUEUE,
166 /** Named Pipe stream driver group. */
167 LOG_GROUP_DRV_NAMEDPIPE,
168 /** NAT network transport driver group */
169 LOG_GROUP_DRV_NAT,
170 /** Raw image driver group */
171 LOG_GROUP_DRV_RAW_IMAGE,
172 /** Async transport driver group */
173 LOG_GROUP_DRV_TRANSPORT_ASYNC,
174 /** TUN network transport driver group */
175 LOG_GROUP_DRV_TUN,
176 /** USB Proxy driver group. */
177 LOG_GROUP_DRV_USBPROXY,
178 /** VBoxHDD media driver group. */
179 LOG_GROUP_DRV_VBOXHDD,
180 /** VBox HDD container media driver group. */
181 LOG_GROUP_DRV_VD,
182 /** Virtual Switch transport driver group */
183 LOG_GROUP_DRV_VSWITCH,
184 /** VUSB driver group */
185 LOG_GROUP_DRV_VUSB,
186 /** EM group. */
187 LOG_GROUP_EM,
188 /** GMM group. */
189 LOG_GROUP_GMM,
190 /** GUI group. */
191 LOG_GROUP_GUI,
192 /** GVMM group. */
193 LOG_GROUP_GVMM,
194 /** HGCM group */
195 LOG_GROUP_HGCM,
196 /** HWACCM group. */
197 LOG_GROUP_HWACCM,
198 /** IOM group. */
199 LOG_GROUP_IOM,
200 /** XPCOM IPC group. */
201 LOG_GROUP_IPC,
202 /** Main group. */
203 LOG_GROUP_MAIN,
204 /** Misc. group intended for external use only. */
205 LOG_GROUP_MISC,
206 /** MM group. */
207 LOG_GROUP_MM,
208 /** MM group. */
209 LOG_GROUP_MM_HEAP,
210 /** MM group. */
211 LOG_GROUP_MM_HYPER,
212 /** MM Hypervisor Heap group. */
213 LOG_GROUP_MM_HYPER_HEAP,
214 /** MM Physical/Ram group. */
215 LOG_GROUP_MM_PHYS,
216 /** MM Page pool group. */
217 LOG_GROUP_MM_POOL,
218 /** PATM group. */
219 LOG_GROUP_PATM,
220 /** PDM group. */
221 LOG_GROUP_PDM,
222 /** PDM Async completion group. */
223 LOG_GROUP_PDM_ASYNC_COMPLETION,
224 /** PDM Device group. */
225 LOG_GROUP_PDM_DEVICE,
226 /** PDM Driver group. */
227 LOG_GROUP_PDM_DRIVER,
228 /** PDM Loader group. */
229 LOG_GROUP_PDM_LDR,
230 /** PDM Loader group. */
231 LOG_GROUP_PDM_QUEUE,
232 /** PGM group. */
233 LOG_GROUP_PGM,
234 /** PGMCACHE group. */
235 LOG_GROUP_PGMCACHE,
236 /** PGM physical group. */
237 LOG_GROUP_PGM_PHYS,
238 /** PGM physical access group. */
239 LOG_GROUP_PGM_PHYS_ACCESS,
240 /** PGM shadow page pool group. */
241 LOG_GROUP_PGM_POOL,
242 /** REM group. */
243 LOG_GROUP_REM,
244 /** REM disassembly handler group. */
245 LOG_GROUP_REM_DISAS,
246 /** REM access handler group. */
247 LOG_GROUP_REM_HANDLER,
248 /** REM I/O port access group. */
249 LOG_GROUP_REM_IOPORT,
250 /** REM MMIO access group. */
251 LOG_GROUP_REM_MMIO,
252 /** REM Printf. */
253 LOG_GROUP_REM_PRINTF,
254 /** REM running group. */
255 LOG_GROUP_REM_RUN,
256 /** SELM group. */
257 LOG_GROUP_SELM,
258 /** Shared folders host service group. */
259 LOG_GROUP_SHARED_FOLDERS,
260 /** OpenGL host service group. */
261 LOG_GROUP_SHARED_OPENGL,
262 /** The internal networking service group. */
263 LOG_GROUP_SRV_INTNET,
264 /** SSM group. */
265 LOG_GROUP_SSM,
266 /** STAM group. */
267 LOG_GROUP_STAM,
268 /** SUP group. */
269 LOG_GROUP_SUP,
270 /** TM group. */
271 LOG_GROUP_TM,
272 /** TRPM group. */
273 LOG_GROUP_TRPM,
274 /** Generic virtual disk layer. */
275 LOG_GROUP_VD,
276 /** VDI virtual disk backend. */
277 LOG_GROUP_VD_VDI,
278 /** VHD virtual disk backend. */
279 LOG_GROUP_VD_VHD,
280 /** VMDK virtual disk backend. */
281 LOG_GROUP_VD_VMDK,
282 /** VM group. */
283 LOG_GROUP_VM,
284 /** VMM group. */
285 LOG_GROUP_VMM,
286 /** VRDP group */
287 LOG_GROUP_VRDP
288 /* !!!ALPHABETICALLY!!! */
289} VBOX_LOGGROUP;
290
291
292/** @def VBOX_LOGGROUP_NAMES
293 * VirtualBox Logging group names.
294 *
295 * Must correspond 100% to LOGGROUP!
296 * Don't forget commas!
297 *
298 * @remark It should be pretty obvious, but just to have
299 * mentioned it, the values are sorted alphabetically (using the
300 * english alphabet) except for _DEFAULT which is always first.
301 *
302 * If anyone might be wondering what the alphabet looks like:
303 * 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
304 */
305#define VBOX_LOGGROUP_NAMES \
306{ \
307 RT_LOGGROUP_NAMES, \
308 "DEFAULT", \
309 "CFGM", \
310 "CPUM", \
311 "CSAM", \
312 "DBGC", \
313 "DBGF", \
314 "DBGF_INFO", \
315 "DBGG", \
316 "DEV", \
317 "DEV_ACPI", \
318 "DEV_AHCI", \
319 "DEV_APIC", \
320 "DEV_AUDIO", \
321 "DEV_DMA", \
322 "DEV_E1000", \
323 "DEV_FDC", \
324 "DEV_IDE", \
325 "DEV_INIP", \
326 "DEV_KBD", \
327 "DEV_NE2000", \
328 "DEV_PARALLEL", \
329 "DEV_PC", \
330 "DEV_PC_ARCH", \
331 "DEV_PC_BIOS", \
332 "DEV_PCI", \
333 "DEV_PCNET", \
334 "DEV_PIC", \
335 "DEV_PIT", \
336 "DEV_RTC", \
337 "DEV_SERIAL", \
338 "DEV_USB", \
339 "DEV_VGA", \
340 "DEV_VMM", \
341 "DEV_VMM_BACKDOOR", \
342 "DEV_VMM_STDERR",\
343 "DIS", \
344 "DRV", \
345 "DRV_ACPI", \
346 "DRV_BLOCK", \
347 "DRV_CHAR", \
348 "DRV_FLOPPY", \
349 "DRV_HOST_BASE", \
350 "DRV_HOST_DVD", \
351 "DRV_HOST_FLOPPY", \
352 "DRV_HOST_PARALLEL", \
353 "DRV_HOST_SERIAL", \
354 "DRV_INTNET", \
355 "DRV_ISCSI", \
356 "DRV_ISCSI_TRANSPORT_TCP", \
357 "DRV_ISO", \
358 "DRV_KBD_QUEUE", \
359 "DRV_LWIP", \
360 "DRV_MOUSE_QUEUE", \
361 "DRV_NAMEDPIPE", \
362 "DRV_NAT", \
363 "DRV_RAW_IMAGE", \
364 "DRV_TRANSPORT_ASYNC", \
365 "DRV_TUN", \
366 "DRV_USBPROXY", \
367 "DRV_VBOXHDD", \
368 "DRV_VD", \
369 "DRV_VSWITCH", \
370 "DRV_VUSB", \
371 "EM", \
372 "GMM", \
373 "GUI", \
374 "GVMM", \
375 "HGCM", \
376 "HWACCM", \
377 "IOM", \
378 "IPC", \
379 "MAIN", \
380 "MISC", \
381 "MM", \
382 "MM_HEAP", \
383 "MM_HYPER", \
384 "MM_HYPER_HEAP",\
385 "MM_PHYS", \
386 "MM_POOL", \
387 "PATM", \
388 "PDM", \
389 "PDM_ASYNC_COMPLETION", \
390 "PDM_DEVICE", \
391 "PDM_DRIVER", \
392 "PDM_LDR", \
393 "PDM_QUEUE", \
394 "PGM", \
395 "PGMCACHE", \
396 "PGM_PHYS", \
397 "PGM_PHYS_ACCESS",\
398 "PGM_POOL", \
399 "REM", \
400 "REM_DISAS", \
401 "REM_HANDLER", \
402 "REM_IOPORT", \
403 "REM_MMIO", \
404 "REM_PRINTF", \
405 "REM_RUN", \
406 "SELM", \
407 "SHARED_FOLDERS",\
408 "SHARED_OPENGL",\
409 "SRV_INTNET", \
410 "SSM", \
411 "STAM", \
412 "SUP", \
413 "TM", \
414 "TRPM", \
415 "VD", \
416 "VD_VDI", \
417 "VD_VHD", \
418 "VD_VMDK", \
419 "VM", \
420 "VMM", \
421 "VRDP", \
422}
423
424/** @} */
425#endif
426
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