Changeset 99616 in vbox
- Timestamp:
- May 5, 2023 8:48:06 AM (19 months ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/GuestHost/Log.h
r99582 r99616 53 53 void VBGHLogVerbose(unsigned iLevel, const char *pszFormat, ...); 54 54 void VBGHLogVerboseV(unsigned iLevel, const char *pszFormat, va_list va); 55 void VBGHLogVerbositySet(unsigned iLevel); 56 unsigned VBGHLogVerbosityGet(void); 55 57 56 58 #endif /* !VBOX_INCLUDED_GuestHost_Log_h */ -
trunk/src/VBox/Additions/x11/VBoxClient/main.cpp
r99585 r99616 738 738 RTBldCfgVersion(), RTBldCfgRevisionStr(), g_cVerbosity); 739 739 740 VBGHLogVerbositySet(g_cVerbosity); 741 740 742 /* Try to detect the current session type early on, if needed. */ 741 743 if (g_enmSessionType == VBGHSESSIONTYPE_AUTO) -
trunk/src/VBox/GuestHost/Log.cpp
r99580 r99616 37 37 38 38 /********************************************************************************************************************************* 39 * Externals*39 * Globals * 40 40 *********************************************************************************************************************************/ 41 extern unsigned g_cVerbosity; /* Current verbosity level; must be provided by the implementation using this code. */41 static unsigned g_vbghLogVerbosity = 0; /* Current guest/host log verbosity level. */ 42 42 43 43 … … 130 130 * Logs an error message with a va_list. 131 131 * 132 * @param pszFormat Format string..133 * @param va Format arguments.132 * @param pszFormat Format string.. 133 * @param va Format arguments. 134 134 */ 135 135 void VBGHLogErrorV(const char *pszFormat, va_list va) … … 141 141 * Logs an error message to the (release) logging instance. 142 142 * 143 * @param pszFormat 143 * @param pszFormat Format string to log. 144 144 */ 145 145 void VBGHLogError(const char *pszFormat, ...) … … 151 151 * Logs a info message with a va_list. 152 152 * 153 * @param pszFormat Format string..154 * @param va Format arguments.153 * @param pszFormat Format string.. 154 * @param va Format arguments. 155 155 */ 156 156 void VBGHLogInfoV(const char *pszFormat, va_list va) … … 172 172 * Logs a fatal error, notifies the desktop environment via a message (if available). 173 173 * 174 * @param pszFormat Format string..175 * @param va Format arguments.174 * @param pszFormat Format string.. 175 * @param va Format arguments. 176 176 */ 177 177 void VBGHLogFatalErrorV(const char *pszFormat, va_list va) … … 197 197 * set global verbosity level. 198 198 * 199 * @param iLevel Minimum log level required to display this message.200 * @param pszFormat Format string.201 * @param ... Format arguments.199 * @param iLevel Minimum log level required to display this message. 200 * @param pszFormat Format string. 201 * @param ... Format arguments. 202 202 */ 203 203 void VBGHLogVerbose(unsigned iLevel, const char *pszFormat, ...) 204 204 { 205 if (iLevel <= g_ cVerbosity)205 if (iLevel <= g_vbghLogVerbosity) 206 206 VBGH_LOG_VA("", pszFormat); 207 207 } … … 211 211 * set global verbosity level with a va_list. 212 212 * 213 * @param iLevel Minimum log level required to display this message.214 * @param pszFormat Format string.215 * @param va Format arguments.213 * @param iLevel Minimum log level required to display this message. 214 * @param pszFormat Format string. 215 * @param va Format arguments. 216 216 */ 217 217 void VBGHLogVerboseV(unsigned iLevel, const char *pszFormat, va_list va) 218 218 { 219 if (iLevel <= g_ cVerbosity)219 if (iLevel <= g_vbghLogVerbosity) 220 220 VBGH_LOG_VALIST("", pszFormat, va); 221 221 } 222 222 223 /** 224 * Sets the verbosity level. 225 * @param iLevel Verbosity level to set. 226 * 227 * @note Not thread safe. 228 */ 229 void VBGHLogVerbositySet(unsigned iLevel) 230 { 231 g_vbghLogVerbosity = iLevel; 232 } 233 234 /** 235 * Gets the current verbosity level. 236 * 237 * @returns The current verbosity level. 238 * 239 * @note Not thread safe. 240 */ 241 unsigned VBGHLogVerbosityGet(void) 242 { 243 return g_vbghLogVerbosity; 244 } 245
Note:
See TracChangeset
for help on using the changeset viewer.