JasPer: Logging

JasPer 4.2.9 |

Loading...
Searching...
No Matches
Logging

# API References

- Logging

# Logging

The library provides an interface for generating log messages. Such messages are used to convey errors, warnings, and other information. Each log message has a type. The type of the log message is represented by the type jas_logtype_t. This type has two components:

- a class (e.g., error, warning, informational, debugging)
- a priority (which is typically only used for debugging messages)

The class and priority of a log message can be obtained from its type by using the functions:

- jas_logtype_getclass()
- jas_logtype_getpriority()

A log type can be initialized via the function:

- jas_logtype_init()

Most error/warning and other messages generated by the JasPer library (including its codecs) use the logging interface. In particular, the following functions are used for logging:

- jas_vlogmsgf()
- jas_logprintf()
- jas_logerrorf()
- jas_logwarnf()
- jas_loginfof()
- jas_logdebugf()

All of these functions are ultimately routed through the vlogmsgf function provided by the library user. The default behavior of this function is to write messages to the standard error stream.