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

Viewer program #1

Closed
alexreg opened this issue Dec 1, 2016 · 5 comments
Closed

Viewer program #1

alexreg opened this issue Dec 1, 2016 · 5 comments

Comments

@alexreg
Copy link

alexreg commented Dec 1, 2016

I could see this becoming the de-facto standard logging format for Slog, if a viewer program were to be provided alongside it. Perhaps one that simply reads from the JSON format, and outputs in the slog-term format, with some basic searching and date-time range capabilities. Is this in your plans?

@dpc
Copy link
Contributor

dpc commented Dec 1, 2016

I had no plans like this. JSON is so ubiquitous that there are multitude of tools to handle them. A viewing software would be potentially more work to write and maintain than slog itself.

If you do find something working for you, or plan to work on it, please let us know!

@dpc dpc closed this as completed Dec 1, 2016
@alexreg
Copy link
Author

alexreg commented Dec 1, 2016

Okay, but there's the general JSON format, then the specific structure of Slog JSON log files... I think I may write a viewing tool myself. We'll see.

@dpc
Copy link
Contributor

dpc commented Dec 1, 2016

slog-json does not really define anything that goes into the json. It's entirely up to the user to define time format, logging severyty key and format and so on. There are some defaults, but they are mostly for users that don't really care. bunyan on the other hand is JSON + definition of key-values semantics.

@alexreg
Copy link
Author

alexreg commented Dec 1, 2016 via email

@dpc
Copy link
Contributor

dpc commented Dec 1, 2016

slog-stream provides a Drain that takes something implementing Format to format logging records and writes it to something implementing io::Writer.

slog-json uses serde (serde-json) and uses it to implement Format for slog-stream with additional fields (key + value) given by user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants