That's a good point: the name of the logger used to log deprecations
should start with "org.apache.velocity" so that it does respect the
logging hierarchy.
On 15/03/2019 09:59, Greg Huber wrote:
If I change in class org.apache.velocity.util.DeprecationAwareExtProperties
protected static Logger logger = LoggerFactory.getLogger("deprecation");
to
protected static Logger logger =
LoggerFactory.getLogger(DeprecationAwareExtProperties.class);
It now logs correctly:
2019-03-15 08:53:10,076 WARN
org.apache.velocity.util.DeprecationAwareExtProperties
DeprecationAwareExtProperties:warnDeprecated - configuration key '
my.resource.loader.public.name' has been deprecated in favor of '
resource.loader.my.public.name'
##
Don't have a log entry for "deprecation".
log4j2.xml
<logger name="org.apache.velocity" level="WARN" additivity="false">
<appender-ref ref="RollingFile" />
</logger>
Can this be updated so it works without any changes?
Cheers Greg
On Thu, 14 Mar 2019 at 19:35, Claude Brisson <cla...@renegat.net.invalid>
wrote:
Those logs are emitted quite early in the webapp initialization. So
chances are the logger is initialized afterwards.
If you are using the webapp-slf4j-logger to forwards slf4j logs towards
tomcat, be sure to:
- use the latest version (1.4)
- put this at the very beginning of your web.xml file:
<listener>
<listener-class>com.republicate.slf4j.impl.ServletContextLoggerListener</listener-class>
</listener>
so that the logger is initialized first.
I'll document that.
If that didn't work, did you check that there wasn't an older
velocity-engine-core jar in the classpath?
On 14/03/2019 17:42, Greg Huber wrote:
Tomcat logs (would be the most useful). I know the logging works because
if there is an invalid #if I get a log message.
On Thu, 14 Mar 2019 at 16:31, Claude Brisson <cla...@renegat.net.invalid
wrote:
I would say yes, since most test cases still use the deprecated
properties.
One of the test cases explicitly checks for the warning in the logs,
which should be something like:
[warn] configuration key 'webapp.resource.loader.description' has
been deprecated in favor of 'resource.loader.webapp.description'
Which logs are you talking about? Yours or maven's? Most test cases logs
aren't visible in maven output.
Claude
On 14/03/2019 10:56, Greg Huber wrote:
Is there any way to check if the depreciated properties logging is
working? I would have thought I would see some messages in the logs:
eg for my
resource.loader = webapp, ....
my 2.0:
webapp.resource.loader.description=Webapp Resource Loader
2.1 property name:
resource.loader.<name>.<prop>
Cheers Greg
On Mon, 11 Mar 2019 at 12:28, Claude Brisson
<cla...@renegat.net.invalid
wrote:
The test build of Velocity Engine 2.1 RC2 is available.
No determination as to the quality ('alpha,' 'beta,' or 'GA') of
Velocity Engine 2.1 RC2 has been made, and at this time it is simply a
"test build". We welcome any comments you may have, and will take all
feedback into account if a quality vote is called for this build.
Release notes:
*
https://dist.apache.org/repos/dist/dev/velocity/velocity-engine/2.1/release-notes.html
Distribution:
*
https://dist.apache.org/repos/dist/dev/velocity/velocity-engine/2.1/
Maven 2 staging repository:
*
https://repository.apache.org/content/repositories/orgapachevelocity-1026/
Documentation:
* http://velocity.apache.org/engine/2.1/
Sources:
* https://svn.apache.org/repos/asf/velocity/engine/tags/2.1/
--
Claude
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org