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

Suggestion - Create a list of "categories", for example "LoggingSinks", "LoggingSources" and "things which can sit in the middle of a source and sink to process log events #15

Open
edward-bestx opened this issue Nov 25, 2024 · 1 comment

Comments

@edward-bestx
Copy link

Just a suggestion for the documentation associated with this project.

There is quite a lot of information to digest on an initial first reading.

One thing which I think would be helpful would be to add a summary page which groups objects into categories:

  • Log sources
  • Log sinks
  • Things which sit in the middle of a source and a sink, like a filter

It looks to me as if many of the components from the various packages are designed to work together and be composable. But it isn't necessarily that clear how they can be composed.


For example, apparently a FormatLogger is a sink. But there are several other sinks, for example

  • FileLogger
  • DatetimeRotatingFileLogger
  • ConsoleLogger
  • SimpleLogger

Shouldn't these objects be able to accept a custom format for logging? (They do.) So, should they be able to accept a FormatLogger, because this is an object which is responsible for formatting a sequence of log events?

The answer of course is that these mentioned sinks are formattable, but they do not use a FormatLogger to do so. A FormatLogger itself is a sink, so it wouldn't make much sense for one type of sink to be chained to another type of sink.

Initially, I thought that a FormatLogger was some kind of intermediate object. But it turns out that's not the case.

@fredrikekre
Copy link
Member

I think this would be a good addition. Do you want to start on something and submit a pull request? I think this page could also include most of https://github.com/JuliaLogging/LoggingExtras.jl?tab=readme-ov-file#discussion-compositional-loggers and it could be sitting under the fourth missing branch (Background and discussion) as described on the front page (https://julialogging.github.io/).

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