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 | */
|
---|
58 | typedef 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 hard disk (raw partition) media driver group. */
|
---|
149 | LOG_GROUP_DRV_HOST_HDD,
|
---|
150 | /** Host Parallel Driver group */
|
---|
151 | LOG_GROUP_DRV_HOST_PARALLEL,
|
---|
152 | /** Host Serial Driver Group */
|
---|
153 | LOG_GROUP_DRV_HOST_SERIAL,
|
---|
154 | /** The internal networking transport driver group. */
|
---|
155 | LOG_GROUP_DRV_INTNET,
|
---|
156 | /** iSCSI Initiator driver group. */
|
---|
157 | LOG_GROUP_DRV_ISCSI,
|
---|
158 | /** iSCSI TCP transport driver group. */
|
---|
159 | LOG_GROUP_DRV_ISCSI_TRANSPORT_TCP,
|
---|
160 | /** ISO (CD/DVD) media driver group. */
|
---|
161 | LOG_GROUP_DRV_ISO,
|
---|
162 | /** Keyboard Queue driver group. */
|
---|
163 | LOG_GROUP_DRV_KBD_QUEUE,
|
---|
164 | /** lwIP IP stack driver group. */
|
---|
165 | LOG_GROUP_DRV_LWIP,
|
---|
166 | /** Mouse Queue driver group. */
|
---|
167 | LOG_GROUP_DRV_MOUSE_QUEUE,
|
---|
168 | /** Named Pipe stream driver group. */
|
---|
169 | LOG_GROUP_DRV_NAMEDPIPE,
|
---|
170 | /** NAT network transport driver group */
|
---|
171 | LOG_GROUP_DRV_NAT,
|
---|
172 | /** Raw image driver group */
|
---|
173 | LOG_GROUP_DRV_RAW_IMAGE,
|
---|
174 | /** Async transport driver group */
|
---|
175 | LOG_GROUP_DRV_TRANSPORT_ASYNC,
|
---|
176 | /** TUN network transport driver group */
|
---|
177 | LOG_GROUP_DRV_TUN,
|
---|
178 | /** USB Proxy driver group. */
|
---|
179 | LOG_GROUP_DRV_USBPROXY,
|
---|
180 | /** VBoxHDD media driver group. */
|
---|
181 | LOG_GROUP_DRV_VBOXHDD,
|
---|
182 | /** VBox HDD container media driver group. */
|
---|
183 | LOG_GROUP_DRV_VD,
|
---|
184 | /** Virtual Switch transport driver group */
|
---|
185 | LOG_GROUP_DRV_VSWITCH,
|
---|
186 | /** VUSB driver group */
|
---|
187 | LOG_GROUP_DRV_VUSB,
|
---|
188 | /** EM group. */
|
---|
189 | LOG_GROUP_EM,
|
---|
190 | /** GMM group. */
|
---|
191 | LOG_GROUP_GMM,
|
---|
192 | /** GUI group. */
|
---|
193 | LOG_GROUP_GUI,
|
---|
194 | /** GVMM group. */
|
---|
195 | LOG_GROUP_GVMM,
|
---|
196 | /** HGCM group */
|
---|
197 | LOG_GROUP_HGCM,
|
---|
198 | /** HWACCM group. */
|
---|
199 | LOG_GROUP_HWACCM,
|
---|
200 | /** IOM group. */
|
---|
201 | LOG_GROUP_IOM,
|
---|
202 | /** XPCOM IPC group. */
|
---|
203 | LOG_GROUP_IPC,
|
---|
204 | /** Main group. */
|
---|
205 | LOG_GROUP_MAIN,
|
---|
206 | /** Misc. group intended for external use only. */
|
---|
207 | LOG_GROUP_MISC,
|
---|
208 | /** MM group. */
|
---|
209 | LOG_GROUP_MM,
|
---|
210 | /** MM group. */
|
---|
211 | LOG_GROUP_MM_HEAP,
|
---|
212 | /** MM group. */
|
---|
213 | LOG_GROUP_MM_HYPER,
|
---|
214 | /** MM Hypervisor Heap group. */
|
---|
215 | LOG_GROUP_MM_HYPER_HEAP,
|
---|
216 | /** MM Physical/Ram group. */
|
---|
217 | LOG_GROUP_MM_PHYS,
|
---|
218 | /** MM Page pool group. */
|
---|
219 | LOG_GROUP_MM_POOL,
|
---|
220 | /** PATM group. */
|
---|
221 | LOG_GROUP_PATM,
|
---|
222 | /** PDM group. */
|
---|
223 | LOG_GROUP_PDM,
|
---|
224 | /** PDM Async completion group. */
|
---|
225 | LOG_GROUP_PDM_ASYNC_COMPLETION,
|
---|
226 | /** PDM Device group. */
|
---|
227 | LOG_GROUP_PDM_DEVICE,
|
---|
228 | /** PDM Driver group. */
|
---|
229 | LOG_GROUP_PDM_DRIVER,
|
---|
230 | /** PDM Loader group. */
|
---|
231 | LOG_GROUP_PDM_LDR,
|
---|
232 | /** PDM Loader group. */
|
---|
233 | LOG_GROUP_PDM_QUEUE,
|
---|
234 | /** PGM group. */
|
---|
235 | LOG_GROUP_PGM,
|
---|
236 | /** PGMCACHE group. */
|
---|
237 | LOG_GROUP_PGMCACHE,
|
---|
238 | /** PGM physical group. */
|
---|
239 | LOG_GROUP_PGM_PHYS,
|
---|
240 | /** PGM physical access group. */
|
---|
241 | LOG_GROUP_PGM_PHYS_ACCESS,
|
---|
242 | /** PGM shadow page pool group. */
|
---|
243 | LOG_GROUP_PGM_POOL,
|
---|
244 | /** REM group. */
|
---|
245 | LOG_GROUP_REM,
|
---|
246 | /** REM disassembly handler group. */
|
---|
247 | LOG_GROUP_REM_DISAS,
|
---|
248 | /** REM access handler group. */
|
---|
249 | LOG_GROUP_REM_HANDLER,
|
---|
250 | /** REM I/O port access group. */
|
---|
251 | LOG_GROUP_REM_IOPORT,
|
---|
252 | /** REM MMIO access group. */
|
---|
253 | LOG_GROUP_REM_MMIO,
|
---|
254 | /** REM Printf. */
|
---|
255 | LOG_GROUP_REM_PRINTF,
|
---|
256 | /** REM running group. */
|
---|
257 | LOG_GROUP_REM_RUN,
|
---|
258 | /** SELM group. */
|
---|
259 | LOG_GROUP_SELM,
|
---|
260 | /** Shared folders host service group. */
|
---|
261 | LOG_GROUP_SHARED_FOLDERS,
|
---|
262 | /** OpenGL host service group. */
|
---|
263 | LOG_GROUP_SHARED_OPENGL,
|
---|
264 | /** The internal networking service group. */
|
---|
265 | LOG_GROUP_SRV_INTNET,
|
---|
266 | /** SSM group. */
|
---|
267 | LOG_GROUP_SSM,
|
---|
268 | /** STAM group. */
|
---|
269 | LOG_GROUP_STAM,
|
---|
270 | /** SUP group. */
|
---|
271 | LOG_GROUP_SUP,
|
---|
272 | /** TM group. */
|
---|
273 | LOG_GROUP_TM,
|
---|
274 | /** TRPM group. */
|
---|
275 | LOG_GROUP_TRPM,
|
---|
276 | /** Generic virtual disk layer. */
|
---|
277 | LOG_GROUP_VD,
|
---|
278 | /** VMDK virtual disk backend. */
|
---|
279 | LOG_GROUP_VD_VMDK,
|
---|
280 | /** VM group. */
|
---|
281 | LOG_GROUP_VM,
|
---|
282 | /** VMM group. */
|
---|
283 | LOG_GROUP_VMM,
|
---|
284 | /** VRDP group */
|
---|
285 | LOG_GROUP_VRDP
|
---|
286 | /* !!!ALPHABETICALLY!!! */
|
---|
287 | } VBOX_LOGGROUP;
|
---|
288 |
|
---|
289 |
|
---|
290 | /** @def VBOX_LOGGROUP_NAMES
|
---|
291 | * VirtualBox Logging group names.
|
---|
292 | *
|
---|
293 | * Must correspond 100% to LOGGROUP!
|
---|
294 | * Don't forget commas!
|
---|
295 | *
|
---|
296 | * @remark It should be pretty obvious, but just to have
|
---|
297 | * mentioned it, the values are sorted alphabetically (using the
|
---|
298 | * english alphabet) except for _DEFAULT which is always first.
|
---|
299 | *
|
---|
300 | * If anyone might be wondering what the alphabet looks like:
|
---|
301 | * 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
|
---|
302 | */
|
---|
303 | #define VBOX_LOGGROUP_NAMES \
|
---|
304 | { \
|
---|
305 | RT_LOGGROUP_NAMES, \
|
---|
306 | "DEFAULT", \
|
---|
307 | "CFGM", \
|
---|
308 | "CPUM", \
|
---|
309 | "CSAM", \
|
---|
310 | "DBGC", \
|
---|
311 | "DBGF", \
|
---|
312 | "DBGF_INFO", \
|
---|
313 | "DBGG", \
|
---|
314 | "DEV", \
|
---|
315 | "DEV_ACPI", \
|
---|
316 | "DEV_AHCI", \
|
---|
317 | "DEV_APIC", \
|
---|
318 | "DEV_AUDIO", \
|
---|
319 | "DEV_DMA", \
|
---|
320 | "DEV_E1000", \
|
---|
321 | "DEV_FDC", \
|
---|
322 | "DEV_IDE", \
|
---|
323 | "DEV_INIP", \
|
---|
324 | "DEV_KBD", \
|
---|
325 | "DEV_NE2000", \
|
---|
326 | "DEV_PARALLEL", \
|
---|
327 | "DEV_PC", \
|
---|
328 | "DEV_PC_ARCH", \
|
---|
329 | "DEV_PC_BIOS", \
|
---|
330 | "DEV_PCI", \
|
---|
331 | "DEV_PCNET", \
|
---|
332 | "DEV_PIC", \
|
---|
333 | "DEV_PIT", \
|
---|
334 | "DEV_RTC", \
|
---|
335 | "DEV_SERIAL", \
|
---|
336 | "DEV_USB", \
|
---|
337 | "DEV_VGA", \
|
---|
338 | "DEV_VMM", \
|
---|
339 | "DEV_VMM_BACKDOOR", \
|
---|
340 | "DEV_VMM_STDERR",\
|
---|
341 | "DIS", \
|
---|
342 | "DRV", \
|
---|
343 | "DRV_ACPI", \
|
---|
344 | "DRV_BLOCK", \
|
---|
345 | "DRV_CHAR", \
|
---|
346 | "DRV_FLOPPY", \
|
---|
347 | "DRV_HOST_BASE", \
|
---|
348 | "DRV_HOST_DVD", \
|
---|
349 | "DRV_HOST_FLOPPY", \
|
---|
350 | "DRV_HOST_HDD", \
|
---|
351 | "DRV_HOST_PARALLEL", \
|
---|
352 | "DRV_HOST_SERIAL", \
|
---|
353 | "DRV_INTNET", \
|
---|
354 | "DRV_ISCSI", \
|
---|
355 | "DRV_ISCSI_TRANSPORT_TCP", \
|
---|
356 | "DRV_ISO", \
|
---|
357 | "DRV_KBD_QUEUE", \
|
---|
358 | "DRV_LWIP", \
|
---|
359 | "DRV_MOUSE_QUEUE", \
|
---|
360 | "DRV_NAMEDPIPE", \
|
---|
361 | "DRV_NAT", \
|
---|
362 | "DRV_RAW_IMAGE", \
|
---|
363 | "DRV_TRANSPORT_ASYNC" \
|
---|
364 | "DRV_TUN", \
|
---|
365 | "DRV_USBPROXY", \
|
---|
366 | "DRV_VBOXHDD", \
|
---|
367 | "DRV_VD", \
|
---|
368 | "DRV_VSWITCH", \
|
---|
369 | "DRV_VUSB", \
|
---|
370 | "EM", \
|
---|
371 | "GMM", \
|
---|
372 | "GUI", \
|
---|
373 | "GVMM", \
|
---|
374 | "HGCM", \
|
---|
375 | "HWACCM", \
|
---|
376 | "IOM", \
|
---|
377 | "IPC", \
|
---|
378 | "MAIN", \
|
---|
379 | "MISC", \
|
---|
380 | "MM", \
|
---|
381 | "MM_HEAP", \
|
---|
382 | "MM_HYPER", \
|
---|
383 | "MM_HYPER_HEAP",\
|
---|
384 | "MM_PHYS", \
|
---|
385 | "MM_POOL", \
|
---|
386 | "PATM", \
|
---|
387 | "PDM", \
|
---|
388 | "PDM_ASYNC_COMPLETION", \
|
---|
389 | "PDM_DEVICE", \
|
---|
390 | "PDM_DRIVER", \
|
---|
391 | "PDM_LDR", \
|
---|
392 | "PDM_QUEUE", \
|
---|
393 | "PGM", \
|
---|
394 | "PGMCACHE", \
|
---|
395 | "PGM_PHYS", \
|
---|
396 | "PGM_PHYS_ACCESS",\
|
---|
397 | "PGM_POOL", \
|
---|
398 | "REM", \
|
---|
399 | "REM_DISAS", \
|
---|
400 | "REM_HANDLER", \
|
---|
401 | "REM_IOPORT", \
|
---|
402 | "REM_MMIO", \
|
---|
403 | "REM_PRINTF", \
|
---|
404 | "REM_RUN", \
|
---|
405 | "SELM", \
|
---|
406 | "SHARED_FOLDERS",\
|
---|
407 | "SHARED_OPENGL",\
|
---|
408 | "SRV_INTNET", \
|
---|
409 | "SSM", \
|
---|
410 | "STAM", \
|
---|
411 | "SUP", \
|
---|
412 | "TM", \
|
---|
413 | "TRPM", \
|
---|
414 | "VD", \
|
---|
415 | "VD_VMDK", \
|
---|
416 | "VM", \
|
---|
417 | "VMM", \
|
---|
418 | "VRDP", \
|
---|
419 | }
|
---|
420 |
|
---|
421 | /** @} */
|
---|
422 | #endif
|
---|
423 |
|
---|