Table of Contents

ILoggerImperativeApi

Namespace
ZCore

Interface for the imperative API for writing log messages, for details see ILogger

INTERFACE ILoggerImperativeApi

Methods

Debug

Logs a message to the logger with log-severity level Debug if the severity level applies.

A Debug message is less granular compared to the trace level, but it is more than you will need in everyday use. The debug log level should be used for information that may be needed for diagnosing issues and troubleshooting or when running an application in a test environment for the purpose of making sure everything is running correctly. For more information about this loglevel, see sematext.

METHOD Debug (
 text : ZString)

Inputs

text ZString

Desired debug message as ASCII text

Error

Logs a message to the logger with log-severity level Error if the severity level applies.

The error level should be used when the application hits an issue preventing one or more functionalities from properly functioning. For instance, if a servo-motor can not reach its desired position or if a sudden pneumatic pressure drop occurs. For more information about this loglevel, see sematext.

METHOD Error (
 text : ZString)

Inputs

text ZString

Desired error message as ASCII text

Fatal

Logs a message to the logger with log-severity level Fatal if the severity level applies.

The error level should be used when the application hits errors that stop the booting process or other hardward related issues (device that is disconnected while using, fieldbus interruptions, ...). For more information about this loglevel, see sematext.

METHOD Fatal (
 text : ZString)

Inputs

text ZString

Desired error message as ASCII text

Info

Logs a message to the logger with log-severity level Info if the severity level applies.

Info is the standard log level and is indicating that something happened, i.e. the application entered a certain state For instance, an operator of your production system starts the automatic sequence and this can be logged as info if it was successfull or not. The information logged using the info log level should be purely informative and not looking into them on a regular basis shouldn’t result in missing any important information. For more information about this loglevel, see sematext.

METHOD Info (
 text : ZString)

Inputs

text ZString

Desired information message as ASCII text

Trace

Logs a message to the logger with log-severity level Trace if the severity level applies.

Trace is the most fine-grained information only used in rare cases where you need the full visibility of what is happening in your application and inside the third-party libraries that you use. You can expect the trace logging level to be very verbose. You can use it for example to annotate each step in a sequence or extra entries in different if branches. For more information about this loglevel, see sematext.

METHOD Trace (
 text : ZString)

Inputs

text ZString

Desired trace message as ASCII text

Warning

Logs a message to the logger with log-severity level Warning if the severity level applies.

A warning indicates that something unexpected happened in the application, a problem, or a situation that might disturb one of the processes. But that doesn’t mean that the application failed or the production system had to be stopped. The warning log level should be used in situations that are unexpected, but the code can continue the work. For example, an electric motor (servo) has two levels for overheating. A warning temperature and a temperature were it is very likely that it will soon get broken. For more information about this loglevel, see sematext.

METHOD Warning (
 text : ZString)

Inputs

text ZString

Desired warning message as ASCII text