Skip to main content
1 of 3

rsyslog dynaFile file name from part of received message

I'm using python logging library to write to log file.

Currently It write to a static file, and contain:

app_name=myapp 2025-06-25 05:44:38 INFO builtins <module> Hello world

I'm new to rsyslog. How to set rsyslog templates to:

  1. Extract the value of 'app_name' and use it as 'key'
  2. Write to local log file with the name of key.log (i.e: myapp.log)
  3. And when writing, only start from the timestamp to the rest.