db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew McIntyre (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-1272) Change sysinfo to print to error log (derby.log) on boot of derby if derby.stream.error.logSeverityLevel=0
Date Fri, 19 May 2006 17:30:30 GMT
    [ http://issues.apache.org/jira/browse/DERBY-1272?page=comments#action_12412540 ] 

Andrew McIntyre commented on DERBY-1272:

Questions from Kathey Marsden on IRC: I have to go but I looked at the patch briefly. 1)I
need to look at all the tmpWriter stuff and see what that is about. 2) Might there be any
potential issues with security excceptions or is that all cleared up now? 3) l ike that it
will always dump for a sane build. 4) A few comments and using a constant for if (logSeverityLevel
== 0) would be nice.

1 - tmpWriter is our output PrintWriter before we've started InfoStreams. If there's a catastrophic
error, we end up writing to the tempWriter instead of the nicely formatted InfoStream. (tempWriter
essentially == PrintWriter logging)

2 - I'm a little concerned about getting derby.stream.error.logSeverityLevel, but I suppose
if you can't get derby.* system props, you're in big trouble anyway. Sysinfo catches and deals
with all security exceptions properly, even for an empty policy file (most restricted environment),
so the call to sysinfo shouldn't be a problem.

3 - yes, convenient. Before this is ready for submission, i need to make sure all tests pass
in both sane and insane builds, although I suspect that we don't actually have a test that
depends specifically on the output of the log file.

4 - I'll beef up the comments before the final. I think the most important part is explaining
why we need to use the tempWriter PrintStream if systemStreams is null. (the answer is because
if there's a catastrophic error and InfoStreams won't start, we need that sysinfo output somewhere)

4b - I can use ExceptionSeverity.NO_APPLICABLE_SEVERITY here, but is that more confusing than
just 0 here, or not?

response from kmarsden - Thanks Andrew, I agree that NO_APPLICABLE_SEVERITY is more confusing.
Just a comment along with the hard coded 0 would be fine. 

> Change sysinfo to print to error log (derby.log) on boot of derby  if derby.stream.error.logSeverityLevel=0
> -----------------------------------------------------------------------------------------------------------
>          Key: DERBY-1272
>          URL: http://issues.apache.org/jira/browse/DERBY-1272
>      Project: Derby
>         Type: Improvement

>   Components: Tools
>     Versions:,,
>     Reporter: Kathey Marsden
>     Priority: Minor
>  Attachments: derby-1272-pre.diff
> It is often very difficult to collect correct sysinfo output from user environments because
 sysinfo run from the commandline does not have the same classpath as the jvm that started
Derby or Derby was loaded with a custom classloader.
> It would be very helpful in assisting users in diagnosing their issues if sysinfo dumped
to the error log if  derby.stream.error.logSeverityLevel=0  or even by default.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message