datalust / seq-tickets

Issues, design discussions and feature roadmap for the Seq log server
https://datalust.co/seq
97 stars 5 forks source link

Nested properties in message templates #1729

Open hi-octane opened 1 year ago

hi-octane commented 1 year ago

Nested properties already widely supported in Seq. They can be displayed as columns, queried using search box like backet.itemsPool.completedJobs > 0, and so on.

However, when trying to use nested property in a message template, nothing happens. For example, the message template Completed = {backet.itemsPool.completedJobs} always rendered as the same raw text in the UI (including 2023 pre-release).

Enabling support for nested properties in message templates looks convenient and logical continuation for previous enhancements made in this direction.

nblumhardt commented 1 year ago

Thanks for the note! To cut a long story short, message templates are intended to be a widely-interchangeable standard for log event capturing and aren't something we want to extend in Seq itself.

Tangentially related, in case it's interesting -

There's a separate effort on the formatting side of things, though, through Serilog.Expressions templates for Serilog, and an adaptation of it we're using in some new scenarios like the Seq HTTP request app. These support similar syntax to message templates, but are designed for formatting events only (not also symmetrically capturing events), and nested properties are fully-supported there.

We're not planning to enable expression template-like functionality in the Events screen, but it's likely we'll use it elsewhere in Seq in the near future.

nblumhardt commented 3 months ago

Related: https://github.com/datalust/serilog-sinks-seq/pull/223