Crates.io | obs-log |
lib.rs | obs-log |
version | 0.1.1 |
source | src |
created_at | 2020-08-22 22:43:17.260931 |
updated_at | 2020-08-22 22:49:10.601499 |
description | A very simple Rust crate that binds the log facade crate to OBS plugin logging API |
homepage | |
repository | https://github.com/necauqua/obs-log |
max_upload_size | |
id | 279631 |
size | 6,452 |
This is a very simple bridge library between the log
crate, which is a
logging facade, and the OBS plugin logging API.
The api is very simple and just maps log calls to blog
with appropriate
logging levels, applying formatting on the Rust side with a format!
call.
Both debug
and trace
levels are mapped into LOG_DEBUG
OBS level since
OBS has no trace level.
It links to the obs
dynamic library, so make sure you have that installed.
As with any log
facade, simply put a call to obs_log::install()
or
obs::log::install_with_level(...)
before using log macros, e.g. in your
obs_module_load
implementation.
Install methods can be called multiple times - next invocations will do nothing.
This small piece of software is licensed under the MIT license which means that
you can do whatever you want with it as long as you include the LICENSE
file
(which has my name written on top of it).
This crate is not intended to be changed much, but issues/PR's that do not suggest/add new features (since it is feature-complete) are welcome.