VirtualBox

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

Last change on this file since 17543 was 8155, checked in by vboxsync, 16 years ago

The Big Sun Rebranding Header Change

  • 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 *
3 * VBoxGuestLib - A support library for VirtualBox guest additions:
4 * Guest Logging facility
5 */
6
7/*
8 * Copyright (C) 2006-2007 Sun Microsystems, Inc.
9 *
10 * This file is part of VirtualBox Open Source Edition (OSE), as
11 * available from http://www.virtualbox.org. This file is free software;
12 * you can redistribute it and/or modify it under the terms of the GNU
13 * General Public License (GPL) as published by the Free Software
14 * Foundation, in version 2 as it comes in the "COPYING" file of the
15 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17 *
18 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
19 * Clara, CA 95054 USA or visit http://www.sun.com if you need
20 * additional information or have any questions.
21 */
22
23#ifndef __VBOXGUESTLOG__H
24#define __VBOXGUESTLOG__H
25
26#if defined(RT_OS_LINUX)
27
28/* Since I don't know the background for the stuff below, I prefer not to
29 change it. I don't need it or want it for backdoor logging inside the
30 Linux Guest Additions kernel modules though. */
31# include <VBox/log.h>
32
33#else /* RT_OS_LINUX not defined */
34/* Save LOG_ENABLED state, because "VBox/rt/log.h"
35 * may undefine it for IN_RING0 code.
36 */
37# if (defined(DEBUG) && !defined(NO_LOGGING)) || defined(LOG_ENABLED)
38# define __LOG_ENABLED_SAVED__
39# endif
40
41# if (defined(DEBUG) && !defined(NO_LOGGING)) || defined(LOG_ENABLED)
42# ifdef VBOX_GUEST
43# include <VBox/log.h>
44# undef Log
45# define Log(a) RTLogBackdoorPrintf a
46# else
47# define Log(a) DbgPrint a
48# endif
49# else
50# define Log(a)
51# endif
52
53# ifdef __LOG_ENABLED_SAVED__
54# define LOG_ENABLED
55# undef __LOG_ENABLED_SAVED__
56# endif
57
58#endif /* RT_OS_LINUX not defined */
59
60#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