Skip to content

feat: added remote syslog logging and log annotation (domain+msgid)#850

Open
terminar wants to merge 1 commit into
foxcpp:masterfrom
terminar:feature/logging-remote-syslog
Open

feat: added remote syslog logging and log annotation (domain+msgid)#850
terminar wants to merge 1 commit into
foxcpp:masterfrom
terminar:feature/logging-remote-syslog

Conversation

@terminar
Copy link
Copy Markdown

This PR extends

  1. the integrated local syslog functionality to use a remote syslog
  2. extends the logging with annotation for domain + msgid (if possible in the pipeline step)

Explanation:
I use Maddy in some sort of shared environment and I needed to separate log access to specific domains.
This PR combined with a filtering/routing syslog daemon (another project) fits the need.

I am not sure if this is interesting in any case but I wanted to share and give back code so here it is.

Comment thread framework/log/log.go
// LogFields are rendered as [key=value ...] before the message text so
// that individual mail flows can be identified and filtered with grep.
// Use With() to populate this.
LogFields []string
Copy link
Copy Markdown
Owner

@foxcpp foxcpp May 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this is a good solution since we already have Fields.

This is probably better done by customizing formatting at Logger level - msg_id is already added explicitly for most log records that are related to message delivery.

This, in turn, would require some further design work as current logger implementation is very simple and lacks extended configuration parsing.

Is there a specific reason why need fields formatted in this exact way?

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.

2 participants