-
-
Notifications
You must be signed in to change notification settings - Fork 17
How to log
To help debug your plugin, you can log.
Plugin standard outputs are redirected so that Yadoms can manage logs from plugins.
All log strings will be time stamped by Yadoms.
Strings written to standard output will be prefixed by "[INFORMATION]". Strings written to standard error output will be prefixed by "[ERROR]".
So for your plugin to log, you simply have to write to standard outputs. In C++, you can use std::cout and std::cerr (alternatively use printf in C). Don't forget the carriage return.
For example :
std::cout << "CFakePlugin is starting..." << std::endl;
will write string into the log file like :
2016/06/17 15:05:16 : [INFORMATION] CFakePlugin is starting...
Plugin log is written on {YadomsBinaryFolder}\logs\plugins\{PluginInstanceId}\plugin.log
, where {PluginInstanceId}
is the ID of the instance using your plugin.
Yadoms web client is also able to display the log file (only in developer mode), from the plugin page in dashboard. You can active developer mode in yadoms.ini
file.
Yadoms -- The ultimate house automation solution