LuciadCPillar leaves the choice of logging framework up to you. There is no obligation to use a specific logging framework in your project. You can plug in the method that suits your project best, by implementing ILoggingBackend and telling the library to use it.

Purpose of the logging API

The LuciadCPillar logging API is not intended for logs generated by your own code. Use your preferred logging solution for that. You can re-direct any logging performed by LuciadCPillar to your solution.

How to plug in your own logging framework

By default, LuciadCPillar writes logging output to the standard output and error streams, depending on the log level. To change that, implement your own back end and tell the library to use it.

An example implementation of ILoggingBackend is available in the samples. See SpdlogLoggingBackend. This implementation re-directs any logging performed by LuciadCPillar to a third-party logging framework, but it still gives you complete control over what gets through, and how it is logged.

Once you have implemented the back end, you must tell LuciadCPillar to use the new implementation. You must do so during global initialization.

Logger names

LuciadCPillar uses the following names for its loggers, based on the topic of their logs:

Table 1. Logger names
Logger name Topic

init

global initialization and cleanup

map

changes to Map, Layer and other map-related objects

net

network access