Namespace: Rx – Class: Logger – Header: Rx.Core/Logger.h

Logger::Init Static Method

C++
static void Init(LoggerType loggerType, LogLevel logLevel, const char* logTarget, int tcpLogPort)

Initializes the logger. If the logger is already created, another call to Init will not change it. Use this to specify the type of the logger to use, and to give the lowest LogLevel that will be logged.

In case of a LoggerType.FILE logger, the loggerTarget has to be filled. In case of a LoggerType.CONSOLE logger, the loggerTarget will be ignored.

Parameters

[LoggerType] loggerType

The logger type.

[LogLevel] logLevel

The log level.

[const char*] logTarget

[in] (Optional) If non-null, the logTarget, i.e. the file name in which to save the log in case of a FILE logger.

[int] tcpLogPort

(Optional) The port to use when logging over tcp.