Task #13151 (closed)
Opened 8 years ago
Closed 8 years ago
BUG: Fix logging levels with BF loci.plugins.LociImporter
Reported by: | bramalingam | Owned by: | sbesson |
---|---|---|---|
Priority: | minor | Milestone: | B-F-5.2.0 |
Component: | Bio-Formats | Version: | BIo-Formats-5.1.5 |
Keywords: | logging, our-fault | Cc: | sbesson |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | n.a. |
Sprint: | n.a. |
Description
ref: https://www.openmicroscopy.org/community/viewtopic.php?f=13&t=7993
The following line,
https://github.com/openmicroscopy/bioformats/blob/develop/components/bio-formats-plugins/src/loci/plugins/LociImporter.java#L69
is basically not allowing any manipulations to the log levels via a script.
Change History (5)
comment:1 Changed 8 years ago by mlinkert
- Component changed from General to Bio-Formats
- Owner set to mlinkert
comment:2 Changed 8 years ago by mlinkert
- Cc sbesson added
- Keywords logging our-fault added
comment:3 Changed 8 years ago by sbesson
Would an API addition like the following allow to solve (1) and (2)
1- DebugTools?.setLogging(...) would always override the logging level whether set by binding-specific configuration file or DebugTools?
2- DebugTools?.enableLogging(...) would first execute DebugTools?.isEnabled(...) and then conditionally set the log level via DebugTools?.setLogging(...) if the logging has not been initialized
comment:4 Changed 8 years ago by sbesson
- Owner changed from mlinkert to sbesson
- Status changed from new to accepted
comment:5 Changed 8 years ago by sbesson
- Resolution set to fixed
- Status changed from accepted to closed
https://github.com/openmicroscopy/bioformats/pull/2272 is related. I have some work on this ongoing in a private repository, with the intention of opening a PR early next week (probably after 2272 is merged now, to avoid conflicts). The idea is to make the logging behave sensibly in all of the following cases:
which means that (1) the configuration file needs to always take precedence, and (2) I think there needs to be an enableLogging signature that lets the log level persist even if enableLogging("...") is called later on by something else. Changing the behavior of the current enableLogging signature to check 2272's isEnabled method before setting the log level might resolve (1).