Skip to content

Forward server and tunnel output with source prefixes - #30

Open
afrigon wants to merge 15 commits into
mainfrom
output-parse
Open

Forward server and tunnel output with source prefixes#30
afrigon wants to merge 15 commits into
mainfrom
output-parse

Conversation

@afrigon

@afrigon afrigon commented Sep 9, 2026

Copy link
Copy Markdown
Owner

First pass on #12: the server console is always read by mc, and player join and leave events are printed as status lines whether or not --server-logs is passed.

  • log4j2.xml console pattern becomes MINECRAFT [LEVEL] [thread]: message; the file appender keeps the standard pattern
  • the server's stdout and stderr are piped and drained line by line; with --server-logs each line is echoed to stdout ahead of any status line it produced
  • --tunnel-logs pipes the agent and echoes every line as TUNNEL: ...; without the flag the agent keeps logging to .tunnel/playitd.log
  • forwarded lines go through the shell's stdout stream, so ANSI codes are stripped when stdout is not a terminal
  • parsing lives in minecraft/log.rs with tests for the join and leave shapes and for player-controlled text that must not match

Refused-login events and the notifier toggle from the issue are left for a follow-up.

- log4j console pattern prefixes lines with MINECRAFT [LEVEL] [thread]
- server output is always read; join and leave events print status lines
- tunnel agent output is echoed with a TUNNEL: prefix under --tunnel-logs
@afrigon afrigon self-assigned this Sep 9, 2026
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

Successfully merging this pull request may close these issues.

1 participant