Logging.cpp revision c12e254c1838a1b167dd65cf40b90067f136d8ca
/* $Id$ */
/** @file
*
* Logging in VBoxSVC.
*/
/*
* Copyright (C) 2011 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#include "Logging.h"
#include <package-generated.h>
#include <iprt/buildconfig.h>
static void vboxsvcHeaderFooter(PRTLOGGER pLoggerRelease, RTLOGPHASE enmPhase, PFNRTLOGPHASEMSG pfnLog)
{
/* some introductory information */
static RTTIMESPEC s_TimeSpec;
char szTmp[256];
if (enmPhase == RTLOGPHASE_BEGIN)
switch (enmPhase)
{
case RTLOGPHASE_BEGIN:
{
"VirtualBox (XP)COM Server %s r%u %s (%s %s) release log\n"
#ifdef VBOX_BLEEDING_EDGE
#endif
"Log opened %s\n",
/* the package type is interesting for Linux distributions */
char szExecName[RTPATH_MAX];
"Executable: %s\n"
"Process ID: %u\n"
"Package type: %s"
#ifdef VBOX_OSE
" (OSE)"
#endif
"\n",
RTProcSelf(),
break;
}
case RTLOGPHASE_PREROTATE:
break;
case RTLOGPHASE_POSTROTATE:
break;
case RTLOGPHASE_END:
break;
default:
/* nothing */;
}
}
{
/* create release logger */
static const char * const s_apszGroups[] = VBOX_LOGGROUP_NAMES;
#if defined(RT_OS_WINDOWS) || defined(RT_OS_OS2)
#endif
if (RT_SUCCESS(vrc))
{
/* register this logger as the release logger */
/* Explicitly flush the log in case of VBOXWEBSRV_RELEASE_LOG=buffered. */
}
else
{
/* print a message, but do not fail */
}
return vrc;
}
/* vi: set tabstop=4 shiftwidth=4 expandtab: */