Quarkus: Openshift - Configure logging to not write in a file

Created on 20 Dec 2018  Â·  16Comments  Â·  Source: quarkusio/quarkus

Because it requires specific permission in the CWD.
Ideally, this can be passed in the command line:

./app -Dlogfile=none

or something like that.

All 16 comments

Since Quarkus is meant to be container first, wouldn't it make sense to not write to a file by default?

I mean one of the factors of the 12 factor app design is to log to stdout only.

I agree, we may change the default, and allow writing to file when the user
wants it.

On Thu 20 Dec 2018 at 10:01, Georgios Andrianakis notifications@github.com
wrote:

Since Protean is meant to be container first, wouldn't it make sense to
not write to a file by default?

I mean one of the factors of the 12 factor app design is to log to stdout
only.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/jbossas/protean-shamrock/issues/355#issuecomment-448923669,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAYjff2MZNRrKSX0lXoENWrKJznMBwetks5u61HwgaJpZM4ZbsIP
.

:+1:

Disabling the log file, and disabling the console, are both things that are configured by MP config already.

Our preferred logging approach will definitely be tailored to the execution environment, but that definitely is not always going to equal logging to stdout only I think. In some cases maybe yes, but in other cases the execution environment is going to want something different (e.g. fluentd). I'd hope we could do something slightly more tailored than a plain stdout-slurping at least.

Passing -Dshamrock.log.file.enable=false should disable the log file; is that sufficient to address the initial issue?

Yes, it’s perfect!

On 7 Feb 2019, at 00:36, David M. Lloyd notifications@github.com wrote:

Passing -Dshamrock.log.file.enable=false should disable the log file; is that sufficient to address the initial issue?

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@geoand do we need any action in the default Dockerfiles or whatever is used in OpenShift?

Yes, we would need to add that to the generated Dockefiles. I can open a PR for this tomorrow

@vorburger I assume this is something we need to add to the native s2i process as well?

@geoand yup, and I have proposed that in #1599 if that's the conclusion of this issue's discussion...

... but I personally actually do also think that this is the wrong approach - the default of true of quarkus.log.file.enable seems wrong, to me, for a "Kubernetes Native Java stack" framework... IMHO default should be console, only; and log file should be opt-in (12 Factor).

-Dshamrock.log.file.enable=false

BTW: It's quarkus.log.file.enable and not shamrock.log.file.enable, right?? That's what doc'd.

We should do something similar in https://github.com/quarkusio/quarkus-quickstarts/pull/81 (non-native S2I) ?

@vorburger I think we should. I am going to open a PR containing a fix only to the generated Dockerfiles

I added PR #1600 for the generated Dockerfiles

FWIW disabling file logging by default is OK with me.

FWIW disabling file logging by default is OK with me.

@dmlloyd I'm happy to raise the respective PR, but I have no idea where the default of quarkus.log.file.enable is defined in the sources... I cannot find it via a quick dumb grep. If you'd like to give me a hint/pointer, I could have a closer look.

Was this page helpful?
0 / 5 - 0 ratings