plctag-log

Crates.ioplctag-log
lib.rsplctag-log
version0.3.1
sourcesrc
created_at2021-09-14 07:19:44.227993
updated_at2023-01-14 12:43:44.318601
descriptionlog adapter for `libplctag`, one component of `plctag` rust bindings
homepagehttps://github.com/Joylei/plctag-rs
repositoryhttps://github.com/Joylei/plctag-rs.git
max_upload_size
id451077
size9,222
joylei (Joylei)

documentation

https://docs.rs/crate/plctag/

README

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

Commit count: 195

cargo fmt