Re: [EXTERNAL] Re: Help with embedded log paths
Fabien Wernli <[email protected]>
| Newsgroups | gmane.comp.syslog-ng |
|---|---|
| Organization | CC-IN2P3 (CNRS) |
| Message-ID | <[email protected]> |
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" ...};
};
};
};
______________________________________________________________________________
Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng
FAQ: http://www.balabit.com/wiki/syslog-ng-faq