In terms of configuring Logback, there is no difference. Both of the following declarations are functionally identical:
<logger name="com.x.y">
<level value="DEBUG"/>
</logger>
<logger name="com.x.y" level="DEBUG" />
Logback's configurer (have a look at ch.qos.logback.core.joran.GenericConfigurator.doConfigure()
) creates an identical Logger
instance for both of these declarations.
The only difference - when parsing the configuration - is that the first one manifests in more instances of ch.qos.logback.core.joran.event.SaxEvent
(start and end events for the logger and for the level) than the second one (start and end events for the logger only).
If you are associating a logger with a specific appender then you'll already be defining a logger element body e.g.
<logger name="com.x.y">
<appender-ref ref="STDOUT"/>
</logger>
In which case defining a level
within the element body rather than as an attribute might read better but it really is just a case of developer preference.