1 | /* $Id: logbackdoor-redirect.cpp 76474 2018-12-25 07:21:57Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VirtualBox Runtime - RTLog stubs for the stripped down IPRT used by
|
---|
4 | * RuntimeGuestR3Shared (X11), output is redirected
|
---|
5 | * to the RTLogBackdoor API where possible.
|
---|
6 | */
|
---|
7 |
|
---|
8 | /*
|
---|
9 | * Copyright (C) 2007-2017 Oracle Corporation
|
---|
10 | *
|
---|
11 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
12 | * available from http://www.virtualbox.org. This file is free software;
|
---|
13 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
14 | * General Public License (GPL) as published by the Free Software
|
---|
15 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
16 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
17 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
18 | *
|
---|
19 | * The contents of this file may alternatively be used under the terms
|
---|
20 | * of the Common Development and Distribution License Version 1.0
|
---|
21 | * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
|
---|
22 | * VirtualBox OSE distribution, in which case the provisions of the
|
---|
23 | * CDDL are applicable instead of those of the GPL.
|
---|
24 | *
|
---|
25 | * You may elect to license modified versions of this file under the
|
---|
26 | * terms and conditions of either the GPL or the CDDL or both.
|
---|
27 | */
|
---|
28 |
|
---|
29 |
|
---|
30 | /*********************************************************************************************************************************
|
---|
31 | * Header Files *
|
---|
32 | *********************************************************************************************************************************/
|
---|
33 | #include <VBox/log.h>
|
---|
34 | #include <iprt/errcore.h>
|
---|
35 |
|
---|
36 |
|
---|
37 |
|
---|
38 | /* All release logging goes to the backdoor logger anyway. */
|
---|
39 | RTDECL(PRTLOGGER) RTLogRelGetDefaultInstance(void)
|
---|
40 | {
|
---|
41 | return NULL;
|
---|
42 | }
|
---|
43 |
|
---|
44 |
|
---|
45 | /* All release logging goes to the backdoor logger anyway. */
|
---|
46 | RTDECL(PRTLOGGER) RTLogRelGetDefaultInstanceEx(uint32_t fFlagsAndGroup)
|
---|
47 | {
|
---|
48 | return NULL;
|
---|
49 | }
|
---|
50 |
|
---|
51 |
|
---|
52 | /* All logging goes to the backdoor logger anyway. */
|
---|
53 | RTDECL(PRTLOGGER) RTLogDefaultInstance(void)
|
---|
54 | {
|
---|
55 | return NULL;
|
---|
56 | }
|
---|
57 |
|
---|
58 |
|
---|
59 | /* All logging goes to the backdoor logger anyway. */
|
---|
60 | RTDECL(PRTLOGGER) RTLogDefaultInstanceEx(uint32_t fFlagsAndGroup)
|
---|
61 | {
|
---|
62 | return NULL;
|
---|
63 | }
|
---|
64 |
|
---|
65 |
|
---|
66 | /* All logging goes to the backdoor logger anyway. */
|
---|
67 | RTDECL(PRTLOGGER) RTLogRelSetDefaultInstance(PRTLOGGER pLogger)
|
---|
68 | {
|
---|
69 | return NULL;
|
---|
70 | }
|
---|
71 |
|
---|
72 |
|
---|
73 | RTDECL(void) RTLogRelPrintf(const char *pszFormat, ...)
|
---|
74 | {
|
---|
75 | va_list va;
|
---|
76 |
|
---|
77 | va_start(va, pszFormat);
|
---|
78 | RTLogBackdoorPrintfV(pszFormat, va);
|
---|
79 | va_end(va);
|
---|
80 | }
|
---|
81 |
|
---|
82 |
|
---|
83 | RTDECL(void) RTLogRelPrintfV(const char *pszFormat, va_list va)
|
---|
84 | {
|
---|
85 | RTLogBackdoorPrintfV(pszFormat, va);
|
---|
86 | }
|
---|
87 |
|
---|
88 |
|
---|
89 | RTDECL(void) RTLogLoggerEx(PRTLOGGER pLogger, unsigned fFlags, unsigned iGroup, const char *pszFormat, ...)
|
---|
90 | {
|
---|
91 | va_list va;
|
---|
92 |
|
---|
93 | va_start(va, pszFormat);
|
---|
94 | RTLogBackdoorPrintfV(pszFormat, va);
|
---|
95 | va_end(va);
|
---|
96 | }
|
---|
97 |
|
---|
98 |
|
---|
99 | RTDECL(void) RTLogPrintf(const char *pszFormat, ...)
|
---|
100 | {
|
---|
101 | va_list va;
|
---|
102 |
|
---|
103 | va_start(va, pszFormat);
|
---|
104 | RTLogBackdoorPrintfV(pszFormat, va);
|
---|
105 | va_end(va);
|
---|
106 | }
|
---|
107 |
|
---|
108 |
|
---|
109 | RTDECL(void) RTLogPrintfV(const char *pszFormat, va_list va)
|
---|
110 | {
|
---|
111 | RTLogBackdoorPrintfV(pszFormat, va);
|
---|
112 | }
|
---|
113 |
|
---|
114 |
|
---|
115 | /* Do nothing for now. */
|
---|
116 | RTDECL(void) RTLogFlush(PRTLOGGER pLogger)
|
---|
117 | {
|
---|
118 | NOREF(pLogger);
|
---|
119 | }
|
---|
120 |
|
---|
121 | /* Do nothing. */
|
---|
122 | RTDECL(int) RTLogCreate(PRTLOGGER *ppLogger, RTUINT fFlags, const char *pszGroupSettings,
|
---|
123 | const char *pszEnvVarBase, unsigned cGroups, const char * const * papszGroups,
|
---|
124 | RTUINT fDestFlags, const char *pszFilenameFmt, ...)
|
---|
125 | {
|
---|
126 | return VERR_NOT_IMPLEMENTED;
|
---|
127 | }
|
---|
128 |
|
---|