This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 231339 - Configuring velocity run time logger location and logger system class
Summary: Configuring velocity run time logger location and logger system class
Status: CLOSED WONTFIX
Alias: None
Product: Tigerstripe (Archived)
Classification: Technology
Component: Core (show other bugs)
Version: 0.3M1   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 0.3M2   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-09 13:08 EDT by Kalyan CLA
Modified: 2012-03-26 09:57 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kalyan CLA 2008-05-09 13:08:12 EDT
I have request to customize the velocity logger. One use case for this is to keep all the tigerstripe generated logs under one specified directory (including velocity.log).
I request to check if it is possible to provide this option via "preferences" window? and project specific preferences can override the same.
Here is some info from velocity that helps with this.
http://velocity.apache.org/engine/releases/velocity-1.5/developer-guide.html#velocity_configuration_keys_and_values
http://velocity.apache.org/engine/releases/velocity-1.5/developer-guide.html#configuring_logging

I checked part of tigerstipe source and found that only classpath and resourceloaders seem to be customized for velocity. It would be useful if the logger can be customizable too.
Comment 1 Richard Craddock CLA 2008-05-28 08:36:32 EDT
As a first pass, I am looking at the following approach. This gives the information that is required, but does not have  the "preference" behaviour requested in teh enahncement request. 

1. The logging of the velocity instance that is used for the persistence (ie internal to Tigerstripe) will be moved to the tigerstripe directory ie alongside tigerstripe.log

2. For plugins, the log will be created in the same location as the pluginlog (where enabled).

The log name will be created by removing the extension from the plugin log and inserting "velocity" and re-appending the extension...

So for example if my pluginlog is set to "logs/createXML.log", I will get an additional log "logs/createXML.velocity.log".

If there is no extension, the just append the word ".velocity" to the end.

If logging is not enabled for a plugin, then the velocity log messages will be appended to the velocity.log i the tigerstripe directory (as now - except for the location).

NOTE THAT : When using a plugin, the velocity log will also contain information about the "internal" templates that are used to create the tigerstripeReport.xml (if enabled).

Comment 2 Richard Craddock CLA 2008-05-28 09:18:59 EDT
Changes described in comment #1 implemented.

Some intermittent problems with close / refresh:

a) Sometimes (and I can't work out out a pattern), the velocity log for a plugin is not refreshed at the end of generate run.

b) Similarly - when the above happens, the log appears to not be closed, and so cannot be deleted.

This latter point looks similar to the problem we have with log4J and capturing the stdout into a log - could be the same issues?

I'm a bit stuck on these at the moment!



Comment 3 Navid Mehregani CLA 2012-03-26 09:57:08 EDT
We looked into this and decided against implementing this enhancement due to the amount of changes required.