Comments (11)
I'm closing this issue, but it's OK to keep chatting here. I even linked to it from README.
I'm quite content with what I got with slog: couple of more features, some polishing, and I'll release 1.0, and see if the project gains traction, are there any rev-dependencies, PRs etc.
I would be happy to share the project ownership, but I basically want to keep the top-level design that loggers form a hierarchy of key-value sequences, and output into a composable drains that perform all functions: multiplexing, filtering, formatting, io etc. I find it very elegant.
from slog.
Hi! I knew that I'm going to miss someones crate! I need some time evaluate blacklog. With slog, I was kind of reaching the core feature completeness, and I think everything else can be implemented as additional crates. If blacklog has some features or potential for them that slog can't get, I'd be happy to merge or switch to help you. You could do the same with slog and we can discuss approaches. Worst case, if we disagree with our assesment, there can be two awesome structured logging crates for Rust. :)
from slog.
Hi! I knew that I'm going to miss someones crate!
I checked crates.io about 2 month ago and didn't find similar crate. For now I just didn't announce it, because blacklog requires nightly (temporary).
Worst case, if we disagree with our assesment, there can be two awesome structured logging crates for Rust.
Yep, that's why I created this issue, because I believe that it is better to focus on a single great library instead of two with nearly-the-same functionality. However we need a third man for quorum :).
Okay
May I tell you what I want for every language to be available as libraries in three words: logs, metrics, tracing. I believe that it is the required tools all need for developing and debugging applications/libraries.
- For metrics there is a https://github.com/posix4e/rust-metrics. Not ideal, but it's OK for current purposes.
- For tracing there is no approach ATM.
- For logs here we are.
With slog, I was kind of reaching the core feature completeness ...
Yes, functionality is ok, but the performance can be better (much). Sadly, but sometimes it requires to rewrite everything from the scratch. That's why I suggested to calm down and to reunite - two clever heads is better than one.
Thoughts?
from slog.
Did you do any performance analysis already?
from slog.
No, just looked into the code. Having an experience with profiling/measuring many logging C++ libraries in the past, a brief look was enough at this moment. :)
from slog.
So what do you think is will drag the performance down?
from slog.
As usual: syscalls, heap allocation, cache misses and cache synchronization. Anyway, it's not the goal of the issue.
from slog.
Please correct me if I got something wrong.
It seems in blacklog
the approach is somewhat more complex. I don't fully understand everything. Eg. actors, layouts. In slog
I've abstracted everything as a Drain
and drains form a hierarchies, that act as filters, writers, io. Since drains are statically parametrized, compiler should be able to do a good job in merging them into once logic. Formaters are parts of respective drains (while can be reused as they implement a common trait), where slog
only provides a facade for serialialization (that seems to be similar), while it looks like in blacklog
there's more code for explicitly handling formatting. slog
seems simpler, but maybe it's simplistic and you know some stuff that I missed.
Logging configuration from a yaml file, seems like an important issue for you, while I kind of dismissed it. I hope it can be implemented as a 3rd-party Drain
(that just creates other drains according).
I really do like modularity in slog
- the fact that except small core everything is in a separate crates.
As much as I can tell other other stuff seems very similar. Small difference in API (different macros), then trying to avoid clone, not block on anything much etc.
Actually I think the performance is very important and affects design and API a lot. I still do have couple of performance changes eg. reusing string, gathering log messages etc. But I hope the slog
does not have any fundamental issues that would make it slow.
from slog.
Third effort! :-) https://github.com/emit-rs/emit
@KodrAus and I have been chipping away at this one when time permits for a little while. I think it's awesome that a few more options are appearing - in the long run the diversity will be good for the ecosystem.
While we're all exploring the design space I'm not sure there will be much shareable output, but I just wanted to drop you a line and let you both know we're out here, in case there's an opportunity to exchange ideas or collaborate down the track.
Cheers!
from slog.
Hah. So it seems we all took inspiration from different projects, in other languages, no?
from slog.
Apparently so! 😄
from slog.
Related Issues (20)
- [Feature] notice log level HOT 1
- ErrorValue requires the wrapped error to be 'static HOT 5
- Macro key-value `"err" => #e` syntax only works as the last argument HOT 4
- Compatibility hazard with Key HOT 6
- travis-ci.org has shutdown HOT 6
- Consider opening Github Discussions HOT 2
- No trace logs being output using slog_envlogger drain HOT 3
- slog-term changelog missing 2.8.1? HOT 1
- Possible to add another drain to an existing root logger? HOT 1
- slog-json: Reconsider `now_local` for default `ts` field? HOT 1
- bug report: slog-stdlog depends log::__private_api_log and slog-stdlog break with log v0.4.15 HOT 6
- Is there a way to not pass Logger to every function HOT 1
- Feature Request: thread_id HOT 1
- Macro formatting HOT 5
- Panic on logger trace level if feature disabled HOT 2
- Print each actix web reqest info HOT 1
- Replace `atty` dependency in `slog-term` due to RUSTSEC-2021-0145 HOT 5
- puzzling apparent conflict between slog, env_logger HOT 3
- slog-json only outputs level in short form HOT 2
- Serde struct not available HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slog.