[ 
http://issues.apache.org/jira/browse/VELOCITY-159?page=comments#action_12330752 
] 

Nathan Bubna commented on VELOCITY-159:
---------------------------------------

Committing the patch for http://issues.apache.org/jira/browse/VELOCITY-403 will 
obviate this issue in several ways:

- the upgrades to LogSystem allow exceptions to be passed along with messages, 
rather than merely as messages.  whether the stack trace is printed is thereby 
passed off to the easily pluggable LogSystem impl (many of which print stacks 
by default).  this is the primary means of avoiding this issue.

- also, the showStackTraces() method is gone and the property check moved to 
LogManager.updateLog() which does not do the allegedly flawed and no longer 
necessary isInitialized() check

- the new Log class does still give the old showStrackTraces() a place by 
tracking the set property and printing the stacks of Throwables passed *as* 
messages if it is true.  subclasses and package members may also directly set 
the property via a protected setShowStackTraces() mutator.

in other words, once the patch for VELOCITY-403 is commited, this issue can be 
resolved.

> Not possible to get Velocity to log stack traces.
> -------------------------------------------------
>
>          Key: VELOCITY-159
>          URL: http://issues.apache.org/jira/browse/VELOCITY-159
>      Project: Velocity
>         Type: Bug
>   Components: Source
>     Versions: 1.4
>  Environment: Operating System: All
> Platform: All
>     Reporter: Victor Wiewiorowski
>     Priority: Minor
>      Fix For: 1.5

>
> I am trying to get velocity to log stack traces, 
> However setting the VelocityEngine.RUNTIME_LOG_ERROR_STACKTRACE does
> not cause the stack traces to be printed, because 
> RuntimeInstance.showStackTrace() first checks configuration.isInitialized(),
> which always seems to return false. :(
> Is there a problem with ExtendedProperties? Looking at the 2.1
> ExtendedProperties source the isInitialized flag is never set, 
> unless I am missing something.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to