This reference page is linked to from the following overview topics: Calling MAXScript from C++.
Class for writing out log information to a file.
#include <log.h>
Public Member Functions |
|
virtual | ~LogSys () |
virtual DWORD | LogTypes () |
virtual void | SetLogTypes (DWORD types) |
virtual void | LogEntry (DWORD type, BOOL dialogue, MCHAR *title, MCHAR *format,...)=0 |
virtual void | SetQuietMode (bool quiet)=0 |
Enables or disables 'quiet' mode. |
|
virtual bool | GetQuietMode ()=0 |
Gets the Quiet Mode. |
|
virtual void | SetSessionLogName (MCHAR *logName)=0 |
Sets additional output log file on session
basis. |
|
virtual MCHAR * | GetSessionLogName ()=0 |
Retrieves the additional output log file.
|
|
Log File Longevity
|
|
virtual int | Longevity () |
Returns the conditions under which the log
is deleted. |
|
virtual void | SetLongevity (int type) |
Sets the conditions under which the log is
deleted. |
|
virtual DWORD | LogDays () |
Returns the conditions under which the log
is cleared. |
|
virtual DWORD | LogSize () |
Returns the size of the current log file in
kilobytes (KB). |
|
virtual void | SetLogDays (DWORD days) |
Set the number of days the log is
maintained. |
|
virtual void | SetLogSize (DWORD size) |
Set the maximum size in kilobytes (KB) of
the log file. |
|
virtual void | SaveState (void)=0 |
State |
|
virtual void | LoadState (void)=0 |
Protected Attributes |
|
DWORD | valTypes |
int | logLife |
DWORD | logDays |
DWORD | logSize |
virtual ~LogSys | ( | ) | [inline, virtual] |
{;}
virtual DWORD LogTypes | ( | ) | [inline, virtual] |
{ return valTypes; }
virtual void SetLogTypes | ( | DWORD | types | ) | [inline, virtual] |
types | - Sets the type of log messages See System Error Log Message Types. |
{ valTypes = types; }
virtual void LogEntry | ( | DWORD | type, |
BOOL | dialogue, | ||
MCHAR * | title, | ||
MCHAR * | format, | ||
... | |||
) | [pure virtual] |
type | - Defines the type of log entry defined in this header file. See System Error Log Message Types. |
dialogue | - One of the following values:
|
title | - This title string is optional. If non NULL, it will be used to define the module. |
format | - This parameter (and any other additional arguments that
follow) make up the format specification. The format matches the
standard C printf() function.
TheManager-\>Max()-\>Log()-\>LogEntry(SYSLOG_ERROR, NO_DIALOG, _M("Warning Title") ,_M("%s - %s\n"), ShortDesc(), errText); |
virtual void SetQuietMode | ( | bool | quiet | ) | [pure virtual] |
Enables or disables 'quiet' mode.
quiet | - TRUE to enable, FALSE to disable. |
virtual bool GetQuietMode | ( | ) | [pure virtual] |
Gets the Quiet Mode.
virtual void SetSessionLogName | ( | MCHAR * | logName | ) | [pure virtual] |
Sets additional output log file on session basis.
This method defines additional log file in specified location. Unlike default max.log file, the output is based on session. If the given file exists, its contents are destroyed.
[in] | logName | - output file name |
virtual MCHAR* GetSessionLogName | ( | ) | [pure virtual] |
Retrieves the additional output log file.
virtual int Longevity | ( | ) | [inline, virtual] |
Returns the conditions under which the log is deleted.
{ return logLife; }
virtual void SetLongevity | ( | int | type | ) | [inline, virtual] |
Sets the conditions under which the log is deleted.
type | - One of the following values:
|
{ logLife = type; }
virtual DWORD LogDays | ( | ) | [inline, virtual] |
Returns the conditions under which the log is cleared.
{ return logDays; }
virtual DWORD LogSize | ( | ) | [inline, virtual] |
Returns the size of the current log file in kilobytes (KB).
{ return logSize; }
virtual void SetLogDays | ( | DWORD | days | ) | [inline, virtual] |
Set the number of days the log is maintained.
days | - The number of days to maintain the log. After this many days after creation the log is deleted. |
{ logDays = days; }
virtual void SetLogSize | ( | DWORD | size | ) | [inline, virtual] |
Set the maximum size in kilobytes (KB) of the log file.
After this size is reached the log file is deleted.
size | - The maximum size in kilobytes (KB) of the log file. |
{ logSize = size; }
virtual void SaveState | ( | void | ) | [pure virtual] |
virtual void LoadState | ( | void | ) | [pure virtual] |
DWORD valTypes
[protected] |
int logLife
[protected] |
DWORD logDays
[protected] |
DWORD logSize
[protected] |