-
Notifications
You must be signed in to change notification settings - Fork 2
Configuration
François JARRIER-GELLEZ edited this page Jan 19, 2021
·
4 revisions
By default, you can find the configuration file to etc folder, the filename is defined by the daemon which use this library.
The configuration file can be specify in the command line.
[mqtt]
server=tcp://127.0.0.1:1883
id=client_id
topic=main_topic_of_daemon
keepalive=300
timeout=5
qos=0
retained=true
[log]
level=1
destination=cerr
module=
function=
[mqttlog]
enable=true
topic=logger/main_topic_of_daemon
level=1
module=
function=
Specify the mqtt provider.
-
serverto define mqtt server url (default tcp://127.0.0.1:1883) -
idto define a mqtt client id (empty by default) -
topicspecify the topic (default value is defined by the daemon which use this library) -
keepalivespecify keepalive, in second (default 300) -
timeoutspecify the timeout, in second (default 5) -
qosspecify the qos (default 0) -
retainedspecify the retained option (default true) -
userspecify a user for mqtt authentication -
passwordspecify a password for mqtt authentication, not use if user is empty
Specify the log file or standard output.
-
levelto define log level, 1 to 7 or FATAL|ERROR|WARNING|INFO|VERBOSE|DEBUG|TRACE (default 1) -
destinationto specify log destination cout, cerr, clog or a file (default cerr) -
moduleto limit log on a source file -
functionto limit log on a single function
To send log on mqtt provider.
-
enableset true to activate this functionnality (default false) -
topicto specify the log topic (default logger/main_topic_of_daemon) -
levelto define log level, 1 to 7 or FATAL|ERROR|WARNING|INFO|VERBOSE|DEBUG|TRACE (default 1) -
moduleto limit log on a source file -
functionto limit log on a single function
To comment a line don't use character # but character ;