Skip to content

Commit

Permalink
ImportLibrary : logging improvements for cli
Browse files Browse the repository at this point in the history
git-svn-id: file:///home/svn/omero/trunk@5239 05709c45-44f0-0310-885b-81a1db45b4a6
  • Loading branch information
joshmoore committed Oct 6, 2009
1 parent 49f83a7 commit f583399
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* {@link ImportLibrary#importCandidates(ome.formats.importer.ImportConfig, ome.formats.importer.ImportCandidates)}
* and after the import is finished offers to submit them via the feedback
* system.
*
*
* @since Beta4.1
*/
public class ErrorHandler extends ome.formats.importer.util.ErrorHandler {
Expand All @@ -42,21 +42,25 @@ public void onUpdate(IObservable importLibrary, ImportEvent event) {
if (event instanceof IMPORT_DONE) {
log.info("Number of errors: " + errors.size());
}

else if (event instanceof SCANNING) {
log.debug(event.toLog());
}

else if (event instanceof FILE_EXCEPTION) {
FILE_EXCEPTION ev = (FILE_EXCEPTION) event;
log.error(ev.toLog());
log.error(ev.toLog(), ev.exception);
}

else if (event instanceof SCANNING_FILE_EXCEPTION) {
SCANNING_FILE_EXCEPTION ev = (SCANNING_FILE_EXCEPTION) event;
log.debug(ev.toLog());
}

else if (event instanceof UNKNOWN_FORMAT) {
log.debug(event.toLog());
}

else if (event instanceof EXCEPTION_EVENT) {
EXCEPTION_EVENT ev = (EXCEPTION_EVENT) event;
log.debug(ev.toLog(), ev.exception);
Expand All @@ -73,7 +77,7 @@ else if (event instanceof ImportEvent.DEBUG_SEND) {

sendFiles = ((ImportEvent.DEBUG_SEND) event).sendFiles;
log.info("Sending error report "
+ ( sendFiles ? "with files " : " ") + "...");
+ (sendFiles ? "with files " : " ") + "...");
sendErrors();
}

Expand Down

0 comments on commit f583399

Please sign in to comment.