class RNET::LogEntry

This class defines a log entry. More...

#include <RNETLog.h>

Inherits: Object.

Public functions:

LogEntry ( RNET::LogEvent iEventType, const RED::String & iComment = "" )
LogEntry ( const RED::String & iString )
~LogEntry ( )
RED::StringToString ( ) const

Public variables:

struct tm_time

Detailed description:

This class defines a log entry.

REDnet can log network events. Each log entry encodes various information about the event (network address, type, date, user-defined event comment).

The date of a log entry is the one of the machine with local time zone correction applied to and follows the ANSI definition of struct tm.

The log entry is output as:

[host IP];[Event date];[Event type];[Event comment]


When logging is enabled (through RNET::System::EnableLog), log entries are output either to a file or to a user-defined callback.

Functions documentation

public RNET::LogEntry::LogEntry(RNET::LogEventiEventType,
const RED::String &iComment = ""


The entry sets itself the date at which it's created.


iEventTypetype of the logged event.
iCommentoptional user comment to be added to the log entry.
public RNET::LogEntry::LogEntry(const RED::String &iString)


Build back a log entry from its string version.

The string version of a log entry can be built by calling RNET::LogEntry::ToString().

If the supplied string is not a valid log entry the resulting object may be undefined.


iStringstring version of a log entry.


Formats the log entry content to a string.

See RNET::System::EnableLog for details about the string format.

A carrier return char is appended at the end of the returned string.


the log entry formatted to a string ready to output to a log file.

Variables documentation

optional user comment about the event.

type of the event.

network address of the host.

public struct tm RNET::LogEntry::_time

the time of the log entry.