Skip to content

Newline syntax for seqcli print templates - #484

Merged
nblumhardt merged 3 commits into
datalust:devfrom
nblumhardt:template-newlines
Aug 7, 2026
Merged

Newline syntax for seqcli print templates#484
nblumhardt merged 3 commits into
datalust:devfrom
nblumhardt:template-newlines

Conversation

@nblumhardt

Copy link
Copy Markdown
Member

seqcli print accepts a --template argument to control formatting. This was previously a Serilog ouput template, where {NewLine} is supported. Recently, this switched to the (vastly more capable and actively developed) Serilog.Expressions formatting, where newlines are expected to be literally included in templates and no special newline syntax exists.

This poses a problem on Windows, where process args are not permitted to contain newlines (it appears to work fine on Linux, which caught me out :-)).

This PR extends --template to allow some simple C#-style escape sequences for newlines:

seqcli search -c 5 | seqcli print --template="{@t} {SourceContext}\n{@m}"

Requires \\ escaping of literal backslashes, though these should rarely show up in this context.

Fixes #483

@nblumhardt
nblumhardt merged commit a7f6a7b into datalust:dev Aug 7, 2026
3 of 4 checks passed
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.

print and template

2 participants