ulog

Crates.ioulog
lib.rsulog
version0.3.0
sourcesrc
created_at2016-11-18 17:51:04.148409
updated_at2016-11-19 15:05:19.461443
descriptionA small logging library (not only) for hard real-time logging.
homepage
repositoryhttps://github.com/mbr/ulog-rs
max_upload_size
id7288
size8,291
Marc Brinkmann (mbr)

documentation

https://docs.rs/ulog

README

ulog

A small logging library (not only) for hard real-time logging. Key features:

  • Asynchronous: ulog sends all log messages through a channel to another thread as soon as possible, trying to minimize the time the logging thread spends processing the log.

  • Standard log: ulog uses the de-facto standard logging facade of log, allowing access to familiar features.

  • Flexible: ulog is small but flexible, allowing different use cases other than standard file or stream logging. Log handling is done by passing a closure that is executed in a different thread.

Real-time

ulog is intended for use on embedded Linux applications that are multithreaded and require a single thread to provide hard real-time guarantees. Logs made using ulog are sent through a synchronous channel before being processed, if logging cannot be completed in constant time, the message is dropped and an error flag is set.

However, allocations have to be made before sending the log entry for asynchronouos processing, to copy fields of a log message, see the LogMessage docs for details.

Other logging crates

There are a lot of other logging crates that offer similar functionality, the closest one in focus is fastlog. While fastlog shares the focus on asynchronous logging, it is unfortunately limited to predefined ways of logging that are mostly files and stdout/-err.

Commit count: 18

cargo fmt