Support for category
Closed this issue · 4 comments
Hi.
It would be nice, if the category could be configured with the appender config. This would allow having only one endpoint for different environments like dev, stg etc. This could be simply set on the appender using a log4j2 env variable or something.
Now I have to create one collector per environment an set the category there and have to pass the different collector endpoints per environment.
Looks like it will be easy to add, although I'm not sure about exposing it as an environment variable. It looks like all other configuration parameters are passed in the appender configuration XML.
That said, I don't think there is anything preventing using an environment variable in the XML like this:
<SumoLogicAppender
name="SumoAppender"
url="${env:sumoLogicUrl}">
...
although I haven't tested it.
Sure sure. ENV variables are handled transparently by log4j2. So no work on this side :). An additional property is the way to go. Thanks for looking into this!
Added in #5 (version 1.1)