ILoggerImperativeApi
- Namespace
- ZCore
INTERFACE ILoggerImperativeApi
Interface for the imperative API for writing log messages, for details see ILogger
Methods
Debug
METHOD Debug (
[input] text : ZString)
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.
Inputs
textZStringDesired debug message as ASCII text
Error
METHOD Error (
[input] text : ZString)
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.
Inputs
textZStringDesired error message as ASCII text
Fatal
METHOD Fatal (
[input] text : ZString)
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.
Inputs
textZStringDesired error message as ASCII text
Info
METHOD Info (
[input] text : ZString)
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.
Inputs
textZStringDesired information message as ASCII text
Trace
METHOD Trace (
[input] text : ZString)
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.
Inputs
textZStringDesired trace message as ASCII text
Warning
METHOD Warning (
[input] text : ZString)
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.
Inputs
textZStringDesired warning message as ASCII text