EssWriteToLogFile

Description

EssWriteToLogFile() writes a message to the Agent log file (ESSBASE.LOG), or to the Server log file (APPNAME.LOG).

Syntax

ESS_FUNC_M  EssWriteToLogFile (hCtx, AgentLog, Message);
ESS_HCTX_ThCtx
ESS_BOOL_TAgentLog
ESS_STR_TMessage

Parameters

hCtx Essbase API context handle.
AgentLog If TRUE, message is written to the Agent log file, ESSBASE.LOG. If FALSE, message is written to the Server log file, APPNAME.LOG.
Message Message to be logged to the Agent log file (ESSBASE.LOG), or to the Server log file (APPNAME.LOG).

Return Value

Returns a zero if successful.

Notes

Access

The caller must have supervisor privilege (ESS_ACCESS_SUPER) for the specified application.

Example

ESS_FUNC_M ESS_WriteToLogFile (ESS_HCTX_T hCtx)
{
   ESS_STR_T     Message = NULL;
   ESS_FUNC_M     sts = ESS_STS_NOERR;                                 
   
   Message = "Received login request";
         
   /* 
    * Writes the message (Received login request) to the Agent log file.
    */
   sts = EssWriteToLogFile(hCtx, ESS_TRUE, Message);
   return(sts);
}

See Also

EssDeleteLogFile()
EssGetLogFile()
EssLogSize()