fledge-power / fledge-south-iec104

A south plugin to gather data using the IEC 104 protocol.
Apache License 2.0
1 stars 3 forks source link

Set log level at plugin init #75

Open FlorentP42 opened 11 months ago

FlorentP42 commented 11 months ago

Is your feature request related to a problem? Please describe. During testing or debugging, some logs that happen very early in the launch process could be missed if the lowest log level (debug) is not enabled from the start.

Describe the solution you'd like Add a compile-time variable START_LOG_LEVEL that, if defined, will become the log level of this plugin at startup. Example of usage when compiling for tests:

cmake -DCMAKE_BUILD_TYPE=Release -DFLEDGE_INCLUDE=/usr/local/fledge/include/ -DFLEDGE_LIB=/usr/local/fledge/lib/ -DCMAKE_CXX_FLAGS=-DSTART_LOG_LEVEL=debug ..

Describe alternatives you've considered N/A

Additional context Example of implementation in: https://github.com/fledge-power/fledge-south-hnz/issues/77

FlorentP42 commented 9 months ago

Actually this was a different topic than the erroneous debug level fixed by #79, reopening.