<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Yes, maybe I'm trying to use loggers for dumps, but I wanted to
use the existing functionality of log-services (Rolling, Sizing,
Layout etc.). What's bad about it?<br>
Yes, of course, different names are used for different loggers.
Having created a Logger object with a specific name, I already set
some logical separation of entities in my program. For example
AAA.BBB.Loading - everything is written in this logger during
loading, and there is a lot and this is a detailed logger, which
describes all the our system configuration files, their versions,
file sizes, success load, criticality of a file. Among them may be
INFO, WARN or ERROR messages. Next example, AAA.BBB.startstop -
this logger records only the events of launching and unloading the
application, so that you can always immediately see when and how
many times it was overloaded or may be crashed.<br>
I see only the possibility to explicitly assign a binding to these
names of the appropriate files in the configuration file. But I
wanted to configure the configuration file so that it did not have
to be changed by hand when adding a new logger to the program
code. About MDC, I'm not too lazy to write MDC calls</p>
<p>But I need every call to the "log.out" method between two MDC.put
and MDC.remove<br>
eg<br>
</p>
<p>public class myLog {<br>
...<br>
private Logger log;<br>
...<br>
<br>
public void myLogOut(String msg) {<br>
MDC.put("logger_id", log.getLoggerName);<br>
log.out(msg);<br>
MDC.remove("logger_id");<br>
}<br>
}<br>
</p>
<p>but in <a class="moz-txt-link-freetext" href="https://logback.qos.ch/manual/mdc.html">https://logback.qos.ch/manual/mdc.html</a> write<br>
</p>
<p><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial,
SunSans-Regular, sans-serif; font-size: medium; font-style:
normal; font-variant-ligatures: normal; font-variant-caps:
normal; font-weight: normal; letter-spacing: normal; orphans: 2;
text-align: start; text-indent: 0px; text-transform: none;
white-space: normal; widows: 2; word-spacing: 0px;
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
255); text-decoration-style: initial; text-decoration-color:
initial; display: inline !important; float: none;">"Please note
that MDC as implemented by logback-classic assumes that values
are placed into the MDC with moderate frequency".</span></p>
<p><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial,
SunSans-Regular, sans-serif; font-size: medium; font-style:
normal; font-variant-ligatures: normal; font-variant-caps:
normal; font-weight: normal; letter-spacing: normal; orphans: 2;
text-align: start; text-indent: 0px; text-transform: none;
white-space: normal; widows: 2; word-spacing: 0px;
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
255); text-decoration-style: initial; text-decoration-color:
initial; display: inline !important; float: none;"><br>
</span></p>
<p><br>
</p>
<pre wrap="">>> Logger names are capable to be filtered in hierarchical way. Your
>> thoughts to use them differently are ill minded...<span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, SunSans-Regular, sans-serif; font-size: medium; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">
Filtering in hierarchical way is very good and useful feature - but now it is implenents only "vertical" (level) separation. When I create a named Logger object in the program, I already also enclose this "horizontal" (logic) separation and I want to use it immediately.
</span></pre>
<p><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial,
SunSans-Regular, sans-serif; font-size: medium; font-style:
normal; font-variant-ligatures: normal; font-variant-caps:
normal; font-weight: normal; letter-spacing: normal; orphans: 2;
text-align: start; text-indent: 0px; text-transform: none;
white-space: normal; widows: 2; word-spacing: 0px;
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
255); text-decoration-style: initial; text-decoration-color:
initial; display: inline !important; float: none;">Thanks to
Ceki Gulku for explain </span><span style="color: rgb(0, 0, 0);
font-family: Verdana, Arial, SunSans-Regular, sans-serif;
font-size: medium; font-style: normal; font-variant-ligatures:
normal; font-variant-caps: normal; font-weight: normal;
letter-spacing: normal; orphans: 2; text-align: start;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255); text-decoration-style:
initial; text-decoration-color: initial; display: inline
!important; float: none;">and example SiftingAppender.<br>
</span></p>
<p><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial,
SunSans-Regular, sans-serif; font-size: medium; font-style:
normal; font-variant-ligatures: normal; font-variant-caps:
normal; font-weight: normal; letter-spacing: normal; orphans: 2;
text-align: start; text-indent: 0px; text-transform: none;
white-space: normal; widows: 2; word-spacing: 0px;
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
255); text-decoration-style: initial; text-decoration-color:
initial; display: inline !important; float: none;"><br>
</span></p>
</body>
</html>