VirtualBox

source: vbox/trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestLog.h@ 38736

Last change on this file since 38736 was 38736, checked in by vboxsync, 13 years ago

*: Please don NOT redefine logger macros.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.8 KB
Line 
1/** @file
2 * VBoxGuestLibR0 - Guest Logging facility.
3 */
4
5/*
6 * Copyright (C) 2006-2007 Oracle Corporation
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 __VBOXGUESTLOG__H
27#define __VBOXGUESTLOG__H
28
29#ifndef RT_OS_WINDOWS
30# error "Don't include this file."
31#else /* RT_OS_WINDOWS */
32/* Save LOG_ENABLED state, because "VBox/rt/log.h"
33 * may undefine it for IN_RING0 code.
34 */
35# if (defined(DEBUG) && !defined(NO_LOGGING)) || defined(LOG_ENABLED)
36# define __LOG_ENABLED_SAVED__
37# endif
38
39# if (defined(DEBUG) && !defined(NO_LOGGING)) || defined(LOG_ENABLED)
40# ifdef VBOX_GUEST
41# include <VBox/log.h>
42# undef Log
43# define Log(a) RTLogBackdoorPrintf a
44# else
45# define Log(a) DbgPrint a
46# endif
47# else
48# define Log(a)
49# endif
50
51# ifdef __LOG_ENABLED_SAVED__
52# define LOG_ENABLED
53# undef __LOG_ENABLED_SAVED__
54# endif
55
56#endif /* RT_OS_WINDOWS */
57
58#endif /* !__VBOXGUESTLOG__H */
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