c30c238d5383e268f3a39c309d28971300aae614vboxsync * Runtime VBox - Release Logger.
c58f1213e628a545081c70e26c6b67a841cff880vboxsync * Copyright (C) 2006-2012 Oracle Corporation
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync * available from http://www.virtualbox.org. This file is free software;
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync * you can redistribute it and/or modify it under the terms of the GNU
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync * General Public License (GPL) as published by the Free Software
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync * The contents of this file may alternatively be used under the terms
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync * of the Common Development and Distribution License Version 1.0
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync * VirtualBox OSE distribution, in which case the provisions of the
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync * CDDL are applicable instead of those of the GPL.
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync * You may elect to license modified versions of this file under the
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync * terms and conditions of either the GPL or the CDDL or both.
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync/*******************************************************************************
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync* Header Files *
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync*******************************************************************************/
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync/*******************************************************************************
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync* Global Variables *
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync*******************************************************************************/
ad27e1d5e48ca41245120c331cc88b50464813cevboxsync/** Default release logger instance. */
7e960d3a0a8a3a84d7aba2cca45d72b1c31cc97bvboxsync#else /* !IN_RC */
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync/** Default release logger instance. */
7e960d3a0a8a3a84d7aba2cca45d72b1c31cc97bvboxsync#endif /* !IN_RC */
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync * Gets the default release logger instance.
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync * @returns Pointer to default release logger instance.
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync * @returns NULL if no default release logger instance available.
7e960d3a0a8a3a84d7aba2cca45d72b1c31cc97bvboxsync#else /* !IN_RC */
7e960d3a0a8a3a84d7aba2cca45d72b1c31cc97bvboxsync#endif /* !IN_RC */
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync * Sets the default logger instance.
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync * @returns iprt status code.
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync * @param pLogger The new default release logger instance.
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsyncRTDECL(PRTLOGGER) RTLogRelSetDefaultInstance(PRTLOGGER pLogger)
c7ff622115966b69b482bd2896662e40d823b22fvboxsync return ASMAtomicXchgPtrT(&g_pRelLogger, pLogger, PRTLOGGER);
7e960d3a0a8a3a84d7aba2cca45d72b1c31cc97bvboxsync#endif /* !IN_RC */
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync * Write to a logger instance, defaulting to the release one.
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync * This function will check whether the instance, group and flags makes up a
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync * logging kind which is currently enabled before writing anything to the log.
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync * @param pLogger Pointer to logger instance. If NULL the default release instance is attempted.
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync * @param fFlags The logging flags.
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync * @param iGroup The group.
ad27e1d5e48ca41245120c331cc88b50464813cevboxsync * The value ~0U is reserved for compatibility with RTLogLogger[V] and is
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync * only for internal usage!
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync * @param pszFormat Format string.
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync * @param args Format arguments.
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsyncRTDECL(void) RTLogRelLoggerV(PRTLOGGER pLogger, unsigned fFlags, unsigned iGroup, const char *pszFormat, va_list args)
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync * A NULL logger means default instance.
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync RTLogLoggerExV(pLogger, fFlags, iGroup, pszFormat, args);
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync * vprintf like function for writing to the default release log.
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync * @param pszFormat Printf like format string.
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync * @param args Optional arguments as specified in pszFormat.
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsync * @remark The API doesn't support formatting of floating point numbers at the moment.
c34f9b1d1526bb5e7fa22d868de402fc50c318fevboxsyncRTDECL(void) RTLogRelPrintfV(const char *pszFormat, va_list args)
89aaf34d7efe046975e813e7ed14b2d1d5530c75vboxsync * Changes the buffering setting of the default release logger.
89aaf34d7efe046975e813e7ed14b2d1d5530c75vboxsync * This can be used for optimizing longish logging sequences.
89aaf34d7efe046975e813e7ed14b2d1d5530c75vboxsync * @returns The old state.
89aaf34d7efe046975e813e7ed14b2d1d5530c75vboxsync * @param fBuffered The new state.
89aaf34d7efe046975e813e7ed14b2d1d5530c75vboxsync return false;