Crates.io | plctag-log |
lib.rs | plctag-log |
version | 0.3.1 |
source | src |
created_at | 2021-09-14 07:19:44.227993 |
updated_at | 2023-01-14 12:43:44.318601 |
description | log adapter for `libplctag`, one component of `plctag` rust bindings |
homepage | https://github.com/Joylei/plctag-rs |
repository | https://github.com/Joylei/plctag-rs.git |
max_upload_size | |
id | 451077 |
size | 9,222 |
log adapter for libplctag
, one component of plctag
rust bindings
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"
libplctag
will print log messages to stdout even if you register your own logger by register_logger
.
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`
Please refer to How to build to setup build environment.
MIT