VirtualBox

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

Last change on this file since 2135 was 2039, checked in by vboxsync, 18 years ago

LOG_GROUP_MISC

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