Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

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.

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

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:

  • no binding-specific configuration file, call to DebugTools?.enableLogging(...) either calling code (e.g. third-party app) or called code but not both
  • no binding-specific configuration file, call to DebugTools?.enableLogging(...) in both calling code and called code (e.g. ImageJ case above)
  • binding-specific configuration file, call to DebugTools?.enableLogging(...) in called code

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).

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

Last edited 8 years ago by sbesson (previous) (diff)

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
Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.71494 sec.)

We're Hiring!