Server
API Reference Guide
Product Documentation:

Rogue Wave Server
Documentation Home
Classes | Enumerations | Functions
logfile.h File Reference
#include <ilserver/ilbarch.h>
#include <ilserver/boolean.h>
#include <ilserver/except.h>
#include <ilserver/sstring.h>
#include <ilserver/ilm.h>
#include <ilserver/iostream.h>
#include <ilserver/fstream.h>

Classes

class  IlsLogfile
 This class can be used to display messages to the user. More...
 
class  IlsOnExitException
 This exception can be thrown by the log file instead of calling exit or abort on a fatal or internal error. More...
 
class  IlsLogfile::MsgDescription
 Gives access to the characteristics of the messages handled by the class IlsLogfile. More...
 

Enumerations

enum  IlsLogLevel {
  ILS_LOG_UNSET, ILS_LOG_DEBUG, ILS_LOG_WARNING, ILS_LOG_INFO,
  ILS_LOG_ERROR, ILS_LOG_FATALERROR, ILS_LOG_INTERNALERROR, ILS_LOG_MSG,
  ILS_LOG_NOTHING
}
 This enumerated type enumerates the various error types that can be generated by the system. More...
 

Functions

ILSIMPORT IlsLogfileIlsDebug (IlsLogfile::CategoryId=0, IlsLogfile::MessageId=0, const IlsString &=IlsString::Null, const IlsString &=IlsLogfile::GetMsgPrefix())
 
ILSIMPORT IlsLogfileIlsError (IlsLogfile::CategoryId=0, IlsLogfile::MessageId=0, const IlsString &=IlsString::Null, const IlsString &=IlsLogfile::GetMsgPrefix())
 
ILSIMPORT IlsLogfileIlsFatalError (IlsLogfile::CategoryId=0, IlsLogfile::MessageId=0, const IlsString &=IlsString::Null, const IlsString &=IlsLogfile::GetMsgPrefix())
 
ILSIMPORT IlsLogfileIlsInfo (IlsLogfile::CategoryId=0, IlsLogfile::MessageId=0, const IlsString &=IlsString::Null, const IlsString &=IlsLogfile::GetMsgPrefix())
 
ILSIMPORT IlsLogfileIlsInternalError (IlsLogfile::CategoryId=0, IlsLogfile::MessageId=0, const IlsString &=IlsString::Null, const IlsString &=IlsLogfile::GetMsgPrefix())
 
ILSIMPORT IlsLogfileIlsMsg (IlsLogfile::CategoryId=0, IlsLogfile::MessageId=0, const IlsString &=IlsString::Null, const IlsString &=IlsLogfile::GetMsgPrefix())
 
ILSIMPORT IlsLogfileIlsWarn (IlsLogfile::CategoryId=0, IlsLogfile::MessageId=0, const IlsString &=IlsString::Null, const IlsString &=IlsLogfile::GetMsgPrefix())
 
Ending a Message
ILSIMPORT void IlsEOM (IlsLogfile &)
 Appends a new line to the message and sends the message. More...
 
Changing the Printing Base for Integers
ILSIMPORT IlsLogfiledec (IlsLogfile &)
 Sets the printing base for integers to decimal. More...
 
ILSIMPORT IlsLogfilehex (IlsLogfile &)
 Sets the printing base for integers to hexadecimal. More...
 
ILSIMPORT IlsLogfileoct (IlsLogfile &)
 Sets the printing base for integers to octal. More...
 
ILSIMPORT IlsLogfilerestore (IlsLogfile &)
 Restores the printing base to its old value. More...
 

Function Documentation

◆ dec()

ILSIMPORT IlsLogfile& dec ( IlsLogfile )

Sets the printing base for integers to decimal.

An example of its use is shown below:

IlsError() << "invalid count " << dec << flags << IlsEOM;

◆ hex()

ILSIMPORT IlsLogfile& hex ( IlsLogfile )

Sets the printing base for integers to hexadecimal.

An example of its use is shown below:

IlsError() << "invalid flag " << hex << flags << IlsEOM;

◆ IlsDebug()

ILSIMPORT IlsLogfile& IlsDebug ( IlsLogfile::CategoryId  = 0,
IlsLogfile::MessageId  = 0,
const IlsString = IlsString::Null,
const IlsString = IlsLogfile::GetMsgPrefix() 
)

Debug messages are not normally posted to the user. However, if you want to have them posted, set the log level (via a call to the static member function SetLogLevel()) to ILS_LOG_DEBUG.

An example of its use is shown below:

IlsDebug() << "internal checking passed ok" << IlsEOM;

◆ IlsEOM()

ILSIMPORT void IlsEOM ( IlsLogfile )

Appends a new line to the message and sends the message.

A message that does not end with IlsEOM is never posted.

◆ IlsError()

ILSIMPORT IlsLogfile& IlsError ( IlsLogfile::CategoryId  = 0,
IlsLogfile::MessageId  = 0,
const IlsString = IlsString::Null,
const IlsString = IlsLogfile::GetMsgPrefix() 
)

An error will not exit after the message has been displayed.

An example of its use is shown below:

IlsError() << "file net.ils does not exist" << IlsEOM;

◆ IlsFatalError()

ILSIMPORT IlsLogfile& IlsFatalError ( IlsLogfile::CategoryId  = 0,
IlsLogfile::MessageId  = 0,
const IlsString = IlsString::Null,
const IlsString = IlsLogfile::GetMsgPrefix() 
)

A fatal error will call exit after the message has been displayed.

An example of its use is shown below:

IlsFatalError() << "cannot connect to display" << IlsEOM;

◆ IlsInfo()

ILSIMPORT IlsLogfile& IlsInfo ( IlsLogfile::CategoryId  = 0,
IlsLogfile::MessageId  = 0,
const IlsString = IlsString::Null,
const IlsString = IlsLogfile::GetMsgPrefix() 
)

An example of its use is shown below:

IlsInfo() << "file saved correctly" << IlsEOM;

◆ IlsInternalError()

ILSIMPORT IlsLogfile& IlsInternalError ( IlsLogfile::CategoryId  = 0,
IlsLogfile::MessageId  = 0,
const IlsString = IlsString::Null,
const IlsString = IlsLogfile::GetMsgPrefix() 
)

An internal error will call abort after the message has been displayed.

An example of its use is shown below:

IlsInternalError() << "process singleton not set" << IlsEOM;

◆ IlsMsg()

An example of its use is shown below:

IlsMsg() << "server initialized..." << IlsEOM;

◆ IlsWarn()

ILSIMPORT IlsLogfile& IlsWarn ( IlsLogfile::CategoryId  = 0,
IlsLogfile::MessageId  = 0,
const IlsString = IlsString::Null,
const IlsString = IlsLogfile::GetMsgPrefix() 
)

An example of its use is shown below:

IlsWarn() << "not able to read startup file" << IlsEOM;

◆ oct()

ILSIMPORT IlsLogfile& oct ( IlsLogfile )

Sets the printing base for integers to octal.

An example of its use is shown below:

IlsError() << "invalid flag " << oct << flags << IlsEOM;

◆ restore()

ILSIMPORT IlsLogfile& restore ( IlsLogfile )

Restores the printing base to its old value.

Only the last value is saved so calling the restore() function twice will not work.

An example of its use is shown below:

IlsError() << "invalid flag " << oct << flags << restore
<< " for count " << count << IlsEOM;
IlsInfo
ILSIMPORT IlsLogfile & IlsInfo(IlsLogfile::CategoryId=0, IlsLogfile::MessageId=0, const IlsString &=IlsString::Null, const IlsString &=IlsLogfile::GetMsgPrefix())
IlsMsg
ILSIMPORT IlsLogfile & IlsMsg(IlsLogfile::CategoryId=0, IlsLogfile::MessageId=0, const IlsString &=IlsString::Null, const IlsString &=IlsLogfile::GetMsgPrefix())
IlsInternalError
ILSIMPORT IlsLogfile & IlsInternalError(IlsLogfile::CategoryId=0, IlsLogfile::MessageId=0, const IlsString &=IlsString::Null, const IlsString &=IlsLogfile::GetMsgPrefix())
hex
ILSIMPORT IlsLogfile & hex(IlsLogfile &)
Sets the printing base for integers to hexadecimal.
IlsError
ILSIMPORT IlsLogfile & IlsError(IlsLogfile::CategoryId=0, IlsLogfile::MessageId=0, const IlsString &=IlsString::Null, const IlsString &=IlsLogfile::GetMsgPrefix())
IlsFatalError
ILSIMPORT IlsLogfile & IlsFatalError(IlsLogfile::CategoryId=0, IlsLogfile::MessageId=0, const IlsString &=IlsString::Null, const IlsString &=IlsLogfile::GetMsgPrefix())
IlsEOM
ILSIMPORT void IlsEOM(IlsLogfile &)
Appends a new line to the message and sends the message.
IlsWarn
ILSIMPORT IlsLogfile & IlsWarn(IlsLogfile::CategoryId=0, IlsLogfile::MessageId=0, const IlsString &=IlsString::Null, const IlsString &=IlsLogfile::GetMsgPrefix())
oct
ILSIMPORT IlsLogfile & oct(IlsLogfile &)
Sets the printing base for integers to octal.
restore
ILSIMPORT IlsLogfile & restore(IlsLogfile &)
Restores the printing base to its old value.
IlsDebug
ILSIMPORT IlsLogfile & IlsDebug(IlsLogfile::CategoryId=0, IlsLogfile::MessageId=0, const IlsString &=IlsString::Null, const IlsString &=IlsLogfile::GetMsgPrefix())
dec
ILSIMPORT IlsLogfile & dec(IlsLogfile &)
Sets the printing base for integers to decimal.