- Notifications
You must be signed in to change notification settings - Fork95
Structured, contextual, extensible, composable logging for Rust
License
Apache-2.0 and 2 other licenses found
Licenses found
slog-rs/slog
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Getting startedIntroductionFAQ
Crate list
slog-rs - The Logging forRust
It's been a while sinceslog
was created and it servedRust community well all this time. It remains a stable, featurefuland battle-tested library, used in many important projects.
In last few years,another ecosystem for Rust wascreated with similar features and a very good support for debuggingasync
codeand already larger dev team and community.
Please checktracing and seeif it is more suitable for your use-case. It seems that it is alreadya go-to logging/tracing solution for Rust.
Reasons you might want to stick withslog
anyway:
async
support doesn't benefit you- you consider mature, stable code & API a plus
- it has some features that
tracing
is missing - great performance (I have NOT done any comparison, but
slog
's performanceis very good).
slog
is an ecosystem of reusable components for structured, extensible,composable and contextual logging forRust.
The ambition is to be The Logging Library for Rust.slog
should accommodate avariety of logging features and requirements. If there is a feature that youneed and standardlog
crate is missing,slog
should have it.
This power comes with a little steeper learning curve, so if you experience anyproblems,please joinslog-rs gitter channel to get up to speed. If you'dlike to take a quick, convenient route, consider usingsloggers wrapper library.
While the code is reliable, the documentation sometimes could use an improvement.Please report all issues and ideas.
Most of the interesting documentation is auto-generated and hosted onhttps://docs.rs.
Go todocs.rs/slog to read about features and APIs(examples included).
Note:slog
is just a core, and the actual functionality is insidemany feature crates. To name a few:
- slog-term for terminal output
- slog-async for asynchronous logging
- slog-json for logging JSON
- slog-syslog for logging to syslog
- sloggers for convenience methods (note:3rd-party library)
There are many more slog feature crates. Search formore slog features oncrates.io. It is easy to write and publishnew ones. Look through all theexisting crates usingslog for examples and ideas.
slog-term
is only one of manyslog
features - useful showcase,multi-platform, and featuring eg. automatic TTY detection and colors.
See following screenshot: same output in both compact and full output mode.
Please useslog-rs gitter channel to ask for help or discussslog features.
Seeexamples/features.rsfor full quick code example overview.
ReadDocumentation for details and features.
To report a bug or ask for features usegithub issues.
Slog related crates are hosted underslog githuborganization.
Dawid Ciężarkiewicz is the original author and current maintainer ofslog
andtherefore self-appointed benevolent dictator over the project. When working onslog Dawid follows and expects everyone to follow hisCode ofConduct.
Any particular repositories under slog ecosystem might be created, controlled,maintained by other entities with various levels of autonomy. Lets work togethertoward a common goal in a respectful and welcoming atmosphere!
To help with the maintained, the ownership of this crate is potentially shared between multiple developers.It is recommended to always usecargo-crevto verify the trustworthiness of each of your dependencies, including this one.
About
Structured, contextual, extensible, composable logging for Rust
Topics
Resources
License
Apache-2.0 and 2 other licenses found
Licenses found
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.