#plc #modbus #automation #ethernet #hardware #api-bindings #log-messages

plctag-log

log adapter for libplctag, one component of plctag rust bindings

5 unstable releases

0.3.1 Jan 14, 2023
0.3.0 Feb 25, 2022
0.2.1 Oct 15, 2021
0.2.0 Oct 14, 2021
0.1.0 Sep 14, 2021

#1179 in Hardware support


Used in plctag

MIT license

65KB
1K SLoC

plctag-log

log adapter for libplctag, one component of plctag rust bindings

crates.io docs build license

Usage

please use it with plctag

by default, libplctag logs internal messages to stdout, if you set debug level other than none. you can register your own logger by calling register_logger. For convenient, log_adapt register a logger for you and will forward internal log messages to cratelog.

Add plctag-log to your Cargo.toml

[dependencies]
plctag-log= "0.3"

Note

libplctag will print log messages to stdout even if you register your own logger by register_logger.

Examples

use plctag_log::*;

log_adapt(); //register logger
set_debug_level(DebugLevel::Info); // set debug level

// now, you can receive log messages by any of logging implementations of crate `log`

Build

Please refer to How to build to setup build environment.

License

MIT

Dependencies

~1.7–4MB
~72K SLoC