OpenPetra
Free Administration Software for Non-Profits
Ict.Common.TLogWriter Class Reference

The TLogWriter class writes arbitrary strings to a specified log file, prefixing them with date and time and optionally also with a prefix. Part of the logging framework for ICT Applications. More...

Public Member Functions

 TLogWriter (string LogfileName)
 constructor that tells where to write the logfile More...
 
bool CanWriteLogFile (out String ALogFileMsg)
 

Static Public Member Functions

static void ResetStaticVariables ()
 reset the static variables for each Web Request call. More...
 
static String GetLogFileName ()
 the name of the current logfile More...
 
static void Log (string strMessage)
 Log message to the current logfile More...
 
static void Log (ArrayList aList, bool isException)
 log a list of messages More...
 

Properties

string LogtextPrefix [get, set]
 this text is always printed in front of each line in the logging can include the current time and user etc More...
 
bool SuppressDateAndTime [get, set]
 Set to true to suppress the logging of date and time in log files (default= false). More...
 

Detailed Description

The TLogWriter class writes arbitrary strings to a specified log file, prefixing them with date and time and optionally also with a prefix. Part of the logging framework for ICT Applications.

Constructor & Destructor Documentation

◆ TLogWriter()

Ict.Common.TLogWriter.TLogWriter ( string  LogfileName)
inline

constructor that tells where to write the logfile

Parameters
LogfileNamewhere to write the logfile

Member Function Documentation

◆ CanWriteLogFile()

bool Ict.Common.TLogWriter.CanWriteLogFile ( out String  ALogFileMsg)
inline

Parameters
ALogFileMsg
Returns

◆ GetLogFileName()

static String Ict.Common.TLogWriter.GetLogFileName ( )
inlinestatic

the name of the current logfile

Returns
the name of the current logfile

◆ Log() [1/2]

static void Ict.Common.TLogWriter.Log ( ArrayList  aList,
bool  isException 
)
inlinestatic

log a list of messages

Parameters
aListthe messages to log
isExceptionif this is an exception, the logging output will look a bit different

◆ Log() [2/2]

static void Ict.Common.TLogWriter.Log ( string  strMessage)
inlinestatic

Log message to the current logfile

Parameters
strMessagemessage to log

◆ ResetStaticVariables()

static void Ict.Common.TLogWriter.ResetStaticVariables ( )
inlinestatic

reset the static variables for each Web Request call.

Property Documentation

◆ LogtextPrefix

string Ict.Common.TLogWriter.LogtextPrefix
getset

this text is always printed in front of each line in the logging can include the current time and user etc

◆ SuppressDateAndTime

bool Ict.Common.TLogWriter.SuppressDateAndTime
getset

Set to true to suppress the logging of date and time in log files (default= false).


The documentation for this class was generated from the following file: