Replies: 2 comments
-
I managed to do this now with the existing library, by defining multiple -items that again refered to independent -items. It means I need to update the logback.xml file for every new tenant, but at least it works. I'm not able to get kvp to work as given in some examples, but not a big deal right now. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Also in Logback you can create appenders programmatically, no need to update config file then. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a single Java server that runs for more then one organization, and I need to separate the log files into separate files per organization. I've been planning to use the tenant functionality in Loki to achieve this. So I'm wondering if this is possible with logi4j. It has a parameter in the appender called http.tenantId which works great, but it seems to be static so I can't parameterize this.
Ideally I'd like something like this
<http> <url>http://localhost:3100/loki/api/v1/push</url> <tenantId>%logger</tenantId> </http>
Where there is one %logger per organization, for example OrgA, OrgB etc. LIke it's possible int the pattern. Do you know if there's any way I can do this? Maybe there's some other functionality somewhere else in the stack other than loki4j that could be used to achieve this also...
Beta Was this translation helpful? Give feedback.
All reactions