EssGetLogFile

Description

EssGetLogFile() copies all or part of an application log file or the Agent log file (ESSBASE.LOG) from the server to the client.

Syntax
ESS_FUNC_M EssGetLogFile (hCtx, AppName, TimeStamp, LocalName}; 
ESS_HCTX_ThCtx
ESS_STR_TAppName
ESS_TIME_TTimeStamp
ESS_STR_TLocalName

Parameters

hCtxEssbase API context handle.
AppNameApplication name or NULL. If NULL, EssGetLogFile accesses the Essbase or server log file (ESSBASE.LOG).
TimeStampTime stamp, indicating date and time of earliest log file entry required. If TimeStamp is set to 0 (zero), EssGetLogFile copies the entire log file.
LocalNameFull path name of local destination file on client.

Return Value

If successful, the file is copied to the local file specified by LocalName.

Notes

Access

This function requires the caller to have application Design privilege (ESS_PRIV_APPDESIGN), or database Design privilege (ESS_PRIV_DBDESIGN) for the specified application or any of its databases.

Example

ESS_FUNC_M 
ESS_GetLogFile (ESS_HCTX_T hCtx)
{
   ESS_FUNC_M     sts = ESS_STS_NOERR;
   ESS_STR_T     AppName;
   ESS_TIME_T    TimeStamp;
   ESS_STR_T     LocalName;                                 
   
   AppName   = "Sample";
   LocalName = "c:\\essbase\\client\\test.log";
   
   /* Get entire log file */
   TimeStamp = 0;
   
   sts = EssGetLogFile(hCtx, AppName, TimeStamp,
         LocalName);
   return (sts);
}

See Also

EssDeleteLogFile()
EssLogSize()
EssWriteToLogFile()