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

Combine multiple printers #5

Open
Bungeefan opened this issue Feb 25, 2023 · 2 comments
Open

Combine multiple printers #5

Bungeefan opened this issue Feb 25, 2023 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed
Milestone

Comments

@Bungeefan
Copy link
Member

I would like to be able to combine multiple printers in any variation and any length.

Example:

You want to prefix your log messages with the log level:
PrefixPrinterPrettyPrinter

Which could then produce this:

┌──────────────────────────────────────────────
│ 15:20:17.587 (+0:00:00.202000)
├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
│ 🐛 DEBUG: Test message
└──────────────────────────────────────────────

Or you want to prefix every line:
PrettyPrinterPrefixPrinter

DEBUG: ┌──────────────────────────────────────────────
DEBUG: │ 15:20:17.587 (+0:00:00.202000)
DEBUG: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
DEBUG: │ 🐛 Test message
DEBUG: └──────────────────────────────────────────────

and so on...

Current blockers:

  • Printers take a LogEvent and return a List<String>.

Maybe we should rethink the approach of using List<String>.

@Bungeefan Bungeefan added enhancement New feature or request help wanted Extra attention is needed labels Feb 25, 2023
@Bungeefan
Copy link
Member Author

Adding feature request by @talhazengin (#22):

PrettyPrinter should have an option to write the log level at the beginning of the log message.

@Bungeefan Bungeefan added this to the 2.0.0 milestone May 10, 2023
@Bungeefan Bungeefan modified the milestones: 2.0.0, 3.0.0 Jul 25, 2023
@Bungeefan
Copy link
Member Author

Bungeefan commented Sep 4, 2023

Draft is available under the multiple_printers branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant