KMSAuditLogger.cpp revision 4f14b0f29aa144cc03efdde5508ae126ae197acf
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
/**
* \file KMSAuditLogger.cpp
*/
#ifndef WIN32
//#include <syslog.h>
#include <stdarg.h>
#endif
#include <stdio.h>
#ifndef METAWARE
#endif
#include <time.h>
#include "KMSAuditLogger.h"
#include "ApplianceParameters.h"
#define AGENT_LOG_FILE "KMSAgentLog.log"
// globals for file logging
static K_MUTEX_HANDLE g_stLogFileMutex;
static char g_sLogFileName[MAX_LOG_FILE_NAME_LENGTH];
// Find header in AuditLogger.h
int InitializeFileLogging( const char* const i_sWorkingDirectory )
{
if ( g_fpLogFileHandle != NULL )
{
return false;
}
{
}
{
return false;
}
{
return false;
}
return true;
}
// Find header in AuditLogger.h
int FinalizeFileLogging()
{
return bSuccess;
}
// Find header in AuditLogger.h
const char* const i_sLogLine )
{
if ( g_fpLogFileHandle == NULL )
{
return false;
}
{
return false;
}
{
return false;
}
if ( fflush( g_fpLogFileHandle ) != 0 )
{
return false;
}
return true;
}
static const int g_iMaxLogFileLineLength = MAX_LOG_FILE_LINE_LENGTH;
int Log_function(
int i_iErrno,
const char* const i_sOperation,
const char* const i_sEntityID,
const char* const i_sNetworkAddress,
const char* const i_sMessage )
{
char sFileLogEntry[500];
const int iTempSize = 100;
"%04d-%02d-%02d %02d:%02d:%02d.%03dZ",
if ( i_sEntityID )
{
}
if ( i_sNetworkAddress )
{
}
if ( i_sOperation )
{
}
if ( i_sMessage )
{
}
}
char* msg2)
{
return 0;
}