[syslog-ng] [EXTERNAL] Re: Help with embedded log paths
Fabien Wernli
wernli at in2p3.fr
Fri Mar 25 07:49:24 UTC 2022
Hi Mark,
Good to hear the if/else model suits you!
On Thu, Mar 24, 2022 at 07:36:58PM +0000, Faine, Mark R. (MSFC-IS40)[NICS] wrote:
> I need some sort of unique identifier that I can put on the file name in a destination that is static and not tied to the message or anything else that changes. It should be created when the file is created and not changed.
>
> I've looked over the macros but I don't see anything, does something like this exist?
All the macros are tied to each and every message, and that's by design:
routing is done per message. If you want something tied to a destination,
all I can suggest is to set it as close as possible to that destination.
For instance, you can set it *in* the destination as follows:
destination d_foo {
channel {
rewrite {
set("my_static_vaule", value("MY_STATIC_MACRO")};
};
destination {
file("/path/to/dest" ...};
};
};
};
More information about the syslog-ng
mailing list