Project

General

Profile

Bug #7649

logging level for ScanDriver's "Failure in file" must be sever to log the stacktrace

Added by Constantin Asofiei 10 months ago. Updated 9 months ago.

Status:
Closed
Priority:
Normal
Target version:
-
Start date:
Due date:
% Done:

100%

billable:
No
vendor_id:
GCD
case_num:
version:

History

#1 Updated by Constantin Asofiei 10 months ago

There are two places in ScanDriver where a Failure in file parsing problem may be encountered - both these need to log with SEVERE instead of FINE, to dump the stacktrace to the log.

#2 Updated by Galya B 10 months ago

With standalone tools I was cautious to convert all System.out prints to logs, because when these run in standalone mode (especially interactively, expecting input) it will produce rather weird output with some messages being formatted as logs and some as plain text. If important msgs are missing from the log files, maybe we can introduce a new mode for CentralLogger and mark the entry points to run it. It will take effect if no mode is already selected for the JVM. The point of the mode will be to simply reroute the msgs to System.out without formatting in the case of no server / client.

I guess ScanDriver can be running outside of client / server, so it may be a good candidate. What do you think?

#3 Updated by Galya B 10 months ago

An important side note: Failure in file at the moment is not logged in any way way, it's simple System.out.println. Also if you find any logs that need a different level, then feel free to change it.

#4 Updated by Constantin Asofiei 10 months ago

In this case (ScanDriver is used by conversion) FWD uses CentralLoggerFallback, which has a default logging level of INFO.

LOG.log(Level.FINE, "", exc); will not emit the stacktrace. I'll change this to SEVERE.

#5 Updated by Galya B 10 months ago

On trunk Failure in file is:

            if (!silent)
            {
               System.out.println("Failure in file '" + result.fileName + "':");
            }

But maybe you've already reworked it on another branch.

#6 Updated by Constantin Asofiei 10 months ago

Galya B wrote:

On trunk Failure in file is:

[...]

But maybe you've already reworked it on another branch.

Look bellow that for the stacktrace:

                     if (!silent)
                     {
                        System.out.println("Failure in file '" + fileName + "':");
                     }

                     LOG.log(Level.FINE, "", exc);

#7 Updated by Constantin Asofiei 10 months ago

  • Assignee set to Constantin Asofiei
  • Status changed from New to Review
  • % Done changed from 0 to 100

Created task branch 7649a from trunk rev 14679.

The fix is in 7649a rev 14680.

#8 Updated by Galya B 10 months ago

  • Assignee changed from Constantin Asofiei to Eric Faulhaber
  • vendor_id deleted (GCD)

This is fine.

If you find some interactive tools having inconsistent output in standalone, then we should do as I mentioned in #2.

#9 Updated by Galya B 10 months ago

  • Assignee changed from Eric Faulhaber to Constantin Asofiei
  • vendor_id set to GCD

ops

#10 Updated by Greg Shah 10 months ago

It will take effect if no mode is already selected for the JVM. The point of the mode will be to simply reroute the msgs to System.out without formatting in the case of no server / client.

I'd like to avoid this for now. Long term, we are moving away from direct usage of stdio.

I guess ScanDriver can be running outside of client / server, so it may be a good candidate. What do you think?

It definitely does run in a non-runtime environment but in the future it will be a highly managed environment which tracks state and definitely is not dependent upon stdio or any interactive UI.

#11 Updated by Greg Shah 10 months ago

Code Review Task Branch 7649a Revision 14680

No objection.

#12 Updated by Constantin Asofiei 9 months ago

Can we merge this to trunk?

#13 Updated by Greg Shah 9 months ago

Yes

#14 Updated by Constantin Asofiei 9 months ago

Branch 7649a was merged to trunk rev 14703.

#15 Updated by Greg Shah 9 months ago

  • Status changed from Review to Closed

Also available in: Atom PDF