[Enhancement request] Option to disable the appender entirely #258
Replies: 2 comments
-
Hi @patpatpat123, the option that comes to my mind is that you can override logback config file for your build, see https://logback.qos.ch/manual/configuration.html#configFileProperty |
Beta Was this translation helpful? Give feedback.
-
Thank you @nehaev for answering. Just to clarify, as I looked at the link provided. Are you suggesting that at compile time, when the logback-spring.xml, without the env variable set) to use some kind of "default dummy logback-spring.xml? And then, only when the env variables are really needed, I then replace with the "real" logback-spring.xml, where the env variables are set? |
Beta Was this translation helpful? Give feedback.
-
Hello team,
I would like to propose a small enhancement request, to ad the possibility to disable the appender entirely.
Context: Several frameworks, at build time, will start logback like in this example:
As you see in this example, to compile the project, the "main" application needs to be started.
When the main application starts, logback is also starting, with it, Loki logback appender is also starting.
We have a configuration file, which has environment variables, as follows:
Deployed on local machine, test env, prod env, those environment variables are always set.
However, when we just need to build the app (not running it, no need for logs here), it would be great to have the possibility to disable the flow entirely. Otherwise, since the variables are absent, this would fail to begin with.
Could you please help proposing an option to disable Loki logback entirely (at least, for when we are just building things, running tests, etc)
Thank you
Beta Was this translation helpful? Give feedback.
All reactions