Yes it does when I use name="Velocity"

But as you are using the runtime instance logger its either on or off for
the whole package.  Using a per class I think enables more filtering as you
can name="org.apache.velocity.app" level="DEBUG" purely for this package
and name="org.apache.velocity" level="WARN" for everything else.

But I you can filter the log file (in eclipse) so it makes no difference.


Thanks for the velocity upgrade!  Thought it was not being maintained any
more.

Cheers Greg

On 10 November 2016 at 14:13, Claude Brisson <cla...@renegat.net> wrote:

> Any module anywhere can get a logger using one of the two static methods:
>
> Logger org.slf4j.LoggerFactory.getLogger(String loggerName)
>
> Logger org.slf4j.LoggerFactory.getLogger(Class targetClass)
>
> Calling one or the other is a matter of taste. It does not *have* to be
> the same logger anywhere in the application, each module can use its own
> logger. The parameter is generally used as a log line prefix, and can also
> be used to do a fine tuning of which modules can log at which log level,
> something we haven't taken advantage so far in Velocity (apart for the
> Tools themselves).
>
> I chose to use the first variant for sobriety (to avoid each log line
> contain the whole package name), but it s not necessarily a definitive
> choice. At least, it should be better documented.
>
> Does your logging work properly with this configuration?
>
>   Claude
>
>
> On 10/11/2016 11:12, Greg Huber wrote:
>
>> The name needs to be exactly Velocity which is not what I had expected,
>> usually its the package name format ie org.apache.velocity.
>>
>> <logger name="Velocity" level="DEBUG" additivity="false">
>>              <appender-ref ref="RollingFile" />
>> </logger>
>>
>> the docs suggest its org.apache.velocity.app.Velocity
>>
>> This seems to be set in RuntimeInstance:
>>
>> private Logger log = LoggerFactory.getLogger("Velocity");
>>
>>
>> Then I do not use slf4j so not sure how it should be configured ie per
>> package.
>>
>> Cheers Greg
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
> For additional commands, e-mail: dev-h...@velocity.apache.org
>
>

Reply via email to