Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternatives to slog-rs #17

Closed
3Hren opened this issue Jul 19, 2016 · 11 comments

Comments

@3Hren
Copy link

@3Hren 3Hren commented Jul 19, 2016

Hi!

Seems like we're both doing the same thing: https://github.com/3Hren/blacklog. Even goals are nearly the same.

I've started this project as a port of my another logging library for C++ focusing on structured logs, performance and configuration from generic source.

Since both our projects in the early alpha stage, maybe we should to calm down and reunite our forces on neutral territory?

What I suggest:

  • Create a separate repo/organization with name we both like.
  • Declare the manifest, which describes how we code, what goals we have etc.
  • Prove each PR with tests and benchmarks. Automate with Travis CI and maybe homu.

Alternatives:

  • Bog off, I want my own crate!
@dpc

This comment has been minimized.

Copy link
Collaborator

@dpc dpc commented Jul 19, 2016

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. :)

@3Hren

This comment has been minimized.

Copy link
Author

@3Hren 3Hren commented Jul 19, 2016

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.

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?

@dpc

This comment has been minimized.

Copy link
Collaborator

@dpc dpc commented Jul 19, 2016

Did you do any performance analysis already?

@3Hren

This comment has been minimized.

Copy link
Author

@3Hren 3Hren commented Jul 19, 2016

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. :)

@dpc

This comment has been minimized.

Copy link
Collaborator

@dpc dpc commented Jul 19, 2016

So what do you think is will drag the performance down?

@3Hren

This comment has been minimized.

Copy link
Author

@3Hren 3Hren commented Jul 19, 2016

As usual: syscalls, heap allocation, cache misses and cache synchronization. Anyway, it's not the goal of the issue.

@dpc

This comment has been minimized.

Copy link
Collaborator

@dpc dpc commented Jul 20, 2016

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.

@nblumhardt

This comment has been minimized.

Copy link

@nblumhardt nblumhardt commented Jul 21, 2016

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!

@dpc

This comment has been minimized.

Copy link
Collaborator

@dpc dpc commented Jul 21, 2016

Hah. So it seems we all took inspiration from different projects, in other languages, no?

@nblumhardt

This comment has been minimized.

Copy link

@nblumhardt nblumhardt commented Jul 21, 2016

Apparently so! 😄

@dpc dpc changed the title What a twist! Alternatives to slog-rs Aug 2, 2016
@dpc

This comment has been minimized.

Copy link
Collaborator

@dpc dpc commented Aug 2, 2016

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.

@dpc dpc closed this Aug 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.