8000 Combine multiple printers · Issue #5 · SourceHorizon/logger · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Combine multiple printers #5
Open
@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

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0