Skip to content

Combine multiple printers #5

@Bungeefan

Description

@Bungeefan

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed
    No fields configured for Feature.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions