Why is log level overridden in cdi test runner?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Why is log level overridden in cdi test runner?

John D. Ament
All,

I was wondering, why is the log level overridden here?
https://github.com/apache/deltaspike/blob/master/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestSuiteRunner.java#L155

I'd like to disable it since most people prefer silent logging when
nothings going on.

John
Reply | Threaded
Open this post in threaded view
|

Re: Why is log level overridden in cdi test runner?

Gerhard Petracek-2
@john:
-1 for disabling it per default (such information is essential if you have
to analyze e.g. random side-effects on ci-servers quickly)
+1 for adding a config-option (which allows to disable it locally)

regards,
gerhard



2016-04-25 1:36 GMT+02:00 John D. Ament <[hidden email]>:

> All,
>
> I was wondering, why is the log level overridden here?
>
> https://github.com/apache/deltaspike/blob/master/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestSuiteRunner.java#L155
>
> I'd like to disable it since most people prefer silent logging when
> nothings going on.
>
> John
>
Reply | Threaded
Open this post in threaded view
|

Re: Why is log level overridden in cdi test runner?

John D. Ament
Could you explain what you consider to be a config option and why the
native logging API doesn't cover it?

If someone wants an info message, they'll have it by default.  If they want
it off they can turn it off.

The code right now forces you to see these info messages.

John

On Mon, Apr 25, 2016 at 5:18 AM Gerhard Petracek <[hidden email]>
wrote:

> @john:
> -1 for disabling it per default (such information is essential if you have
> to analyze e.g. random side-effects on ci-servers quickly)
> +1 for adding a config-option (which allows to disable it locally)
>
> regards,
> gerhard
>
>
>
> 2016-04-25 1:36 GMT+02:00 John D. Ament <[hidden email]>:
>
> > All,
> >
> > I was wondering, why is the log level overridden here?
> >
> >
> https://github.com/apache/deltaspike/blob/master/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestSuiteRunner.java#L155
> >
> > I'd like to disable it since most people prefer silent logging when
> > nothings going on.
> >
> > John
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Why is log level overridden in cdi test runner?

Gerhard Petracek-2
@john:

we just force the level of one logger (used by us) to avoid that important
information (start/stop/failed messages) get skipped (due to a global
config).
e.g. some jpa-issues (esp. in combination with in-memory-dbs) can lead to
strange side-effects in @Before/@After logic (-> e.g. the >next< test
fails).
-> this information can help a lot!

before this part was moved to ds, it was possible to disable those
log-entries. people did that ~frequently until they hit such an issue.
once they spent hours in analyzing random side-effects across test-methods,
they usually enabled it again (because they realized that it would have
taken way less time to analyze the issue).
some argued that they could enable it just on their ci-server or in case
there are issues, however, it turned out that people forget about it...
-> the config-option was dropped (esp. because 2 log-entries per
test-method isn't a big deal).
-> if we provide a config-option to disable such log-entries, you can do it
- but on your own risk (to miss essential information)...

regards,
gerhard



2016-04-25 12:49 GMT+02:00 John D. Ament <[hidden email]>:

> Could you explain what you consider to be a config option and why the
> native logging API doesn't cover it?
>
> If someone wants an info message, they'll have it by default.  If they want
> it off they can turn it off.
>
> The code right now forces you to see these info messages.
>
> John
>
> On Mon, Apr 25, 2016 at 5:18 AM Gerhard Petracek <[hidden email]>
> wrote:
>
> > @john:
> > -1 for disabling it per default (such information is essential if you
> have
> > to analyze e.g. random side-effects on ci-servers quickly)
> > +1 for adding a config-option (which allows to disable it locally)
> >
> > regards,
> > gerhard
> >
> >
> >
> > 2016-04-25 1:36 GMT+02:00 John D. Ament <[hidden email]>:
> >
> > > All,
> > >
> > > I was wondering, why is the log level overridden here?
> > >
> > >
> >
> https://github.com/apache/deltaspike/blob/master/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestSuiteRunner.java#L155
> > >
> > > I'd like to disable it since most people prefer silent logging when
> > > nothings going on.
> > >
> > > John
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Why is log level overridden in cdi test runner?

john.d.ament
Gerhard,

I still don't quite see the issue with letting the log level dictate what
gets shown.  Do you consider the log level to be a valid config option
here, assuming we document how to override (e.g. with logging.properties)?

John

On Tue, Apr 26, 2016 at 6:53 AM Gerhard Petracek <[hidden email]>
wrote:

> @john:
>
> we just force the level of one logger (used by us) to avoid that important
> information (start/stop/failed messages) get skipped (due to a global
> config).
> e.g. some jpa-issues (esp. in combination with in-memory-dbs) can lead to
> strange side-effects in @Before/@After logic (-> e.g. the >next< test
> fails).
> -> this information can help a lot!
>
> before this part was moved to ds, it was possible to disable those
> log-entries. people did that ~frequently until they hit such an issue.
> once they spent hours in analyzing random side-effects across test-methods,
> they usually enabled it again (because they realized that it would have
> taken way less time to analyze the issue).
> some argued that they could enable it just on their ci-server or in case
> there are issues, however, it turned out that people forget about it...
> -> the config-option was dropped (esp. because 2 log-entries per
> test-method isn't a big deal).
> -> if we provide a config-option to disable such log-entries, you can do it
> - but on your own risk (to miss essential information)...
>
> regards,
> gerhard
>
>
>
> 2016-04-25 12:49 GMT+02:00 John D. Ament <[hidden email]>:
>
> > Could you explain what you consider to be a config option and why the
> > native logging API doesn't cover it?
> >
> > If someone wants an info message, they'll have it by default.  If they
> want
> > it off they can turn it off.
> >
> > The code right now forces you to see these info messages.
> >
> > John
> >
> > On Mon, Apr 25, 2016 at 5:18 AM Gerhard Petracek <[hidden email]>
> > wrote:
> >
> > > @john:
> > > -1 for disabling it per default (such information is essential if you
> > have
> > > to analyze e.g. random side-effects on ci-servers quickly)
> > > +1 for adding a config-option (which allows to disable it locally)
> > >
> > > regards,
> > > gerhard
> > >
> > >
> > >
> > > 2016-04-25 1:36 GMT+02:00 John D. Ament <[hidden email]>:
> > >
> > > > All,
> > > >
> > > > I was wondering, why is the log level overridden here?
> > > >
> > > >
> > >
> >
> https://github.com/apache/deltaspike/blob/master/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestSuiteRunner.java#L155
> > > >
> > > > I'd like to disable it since most people prefer silent logging when
> > > > nothings going on.
> > > >
> > > > John
> > > >
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Why is log level overridden in cdi test runner?

Gerhard Petracek
Administrator
@john:
please check if it's still an issue for you - see DELTASPIKE-1151

regards,
gerhard



2016-06-02 3:19 GMT+02:00 John D. Ament <[hidden email]>:

> Gerhard,
>
> I still don't quite see the issue with letting the log level dictate what
> gets shown.  Do you consider the log level to be a valid config option
> here, assuming we document how to override (e.g. with logging.properties)?
>
> John
>
> On Tue, Apr 26, 2016 at 6:53 AM Gerhard Petracek <[hidden email]>
> wrote:
>
> > @john:
> >
> > we just force the level of one logger (used by us) to avoid that
> important
> > information (start/stop/failed messages) get skipped (due to a global
> > config).
> > e.g. some jpa-issues (esp. in combination with in-memory-dbs) can lead to
> > strange side-effects in @Before/@After logic (-> e.g. the >next< test
> > fails).
> > -> this information can help a lot!
> >
> > before this part was moved to ds, it was possible to disable those
> > log-entries. people did that ~frequently until they hit such an issue.
> > once they spent hours in analyzing random side-effects across
> test-methods,
> > they usually enabled it again (because they realized that it would have
> > taken way less time to analyze the issue).
> > some argued that they could enable it just on their ci-server or in case
> > there are issues, however, it turned out that people forget about it...
> > -> the config-option was dropped (esp. because 2 log-entries per
> > test-method isn't a big deal).
> > -> if we provide a config-option to disable such log-entries, you can do
> it
> > - but on your own risk (to miss essential information)...
> >
> > regards,
> > gerhard
> >
> >
> >
> > 2016-04-25 12:49 GMT+02:00 John D. Ament <[hidden email]>:
> >
> > > Could you explain what you consider to be a config option and why the
> > > native logging API doesn't cover it?
> > >
> > > If someone wants an info message, they'll have it by default.  If they
> > want
> > > it off they can turn it off.
> > >
> > > The code right now forces you to see these info messages.
> > >
> > > John
> > >
> > > On Mon, Apr 25, 2016 at 5:18 AM Gerhard Petracek <[hidden email]
> >
> > > wrote:
> > >
> > > > @john:
> > > > -1 for disabling it per default (such information is essential if you
> > > have
> > > > to analyze e.g. random side-effects on ci-servers quickly)
> > > > +1 for adding a config-option (which allows to disable it locally)
> > > >
> > > > regards,
> > > > gerhard
> > > >
> > > >
> > > >
> > > > 2016-04-25 1:36 GMT+02:00 John D. Ament <[hidden email]>:
> > > >
> > > > > All,
> > > > >
> > > > > I was wondering, why is the log level overridden here?
> > > > >
> > > > >
> > > >
> > >
> >
> https://github.com/apache/deltaspike/blob/master/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestSuiteRunner.java#L155
> > > > >
> > > > > I'd like to disable it since most people prefer silent logging when
> > > > > nothings going on.
> > > > >
> > > > > John
> > > > >
> > > >
> > >
> >
>