• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>Why not using hierarchy of loggers, like in log4j? Why not Boost.Log4j? Etc.</title>
5<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7<link rel="home" href="../../index.html" title="Chapter 1. Boost.Log v2">
8<link rel="up" href="../rationale.html" title="Rationale and FAQ">
9<link rel="prev" href="why_not_lazy_streaming.html" title="Why not using lazy streaming?">
10<link rel="next" href="fork_support.html" title="Does Boost.Log support process forking?">
11</head>
12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td></tr></table>
14<hr>
15<div class="spirit-nav">
16<a accesskey="p" href="why_not_lazy_streaming.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../rationale.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="fork_support.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
17</div>
18<div class="section">
19<div class="titlepage"><div><div><h3 class="title">
20<a name="log.rationale.why_not_log4j"></a><a class="link" href="why_not_log4j.html" title="Why not using hierarchy of loggers, like in log4j? Why not Boost.Log4j? Etc.">Why not using hierarchy
21      of loggers, like in log4j? Why not Boost.Log4j? Etc.</a>
22</h3></div></div></div>
23<p>
24        There are enough <a href="http://logging.apache.org/log4j/" target="_top">log4j</a>-like
25        libraries available for C++ already (see <a href="http://logging.apache.org/log4cxx/" target="_top">here</a>,
26        <a href="http://log4cplus.sourceforge.net/" target="_top">here</a> and <a href="http://log4cpp.sourceforge.net/" target="_top">here</a>),
27        so there is no point in implementing yet another one. Instead, this library
28        was aimed to solve more complex tasks, including ones that do not directly
29        fall under the common definition of "logging" term as a debugging
30        tool. Additionally, as Boost.Log was to be a generic library, it had to provide
31        more ways of extending itself, while keeping performance as high as possible.
32        Log4j concept seemed too limiting and inappropriate for these tasks and therefore
33        was rejected.
34      </p>
35<p>
36        As for hierarchical loggers, there is no need for this feature in the current
37        library design. One of the main benefits it provides in log4j is determining
38        the appenders (sinks, in terms of this library) in which a log record will
39        end up. This library achieves the same result by filtering. The other application
40        of this feature in Boost.Log could be that the loggers in the hierarchy could
41        combine their sets of attributes for each log record, but there was no demand
42        in real world applications for such a feature. It can be added though, if
43        it proves useful.
44      </p>
45</div>
46<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
47<td align="left"></td>
48<td align="right"><div class="copyright-footer">Copyright © 2007-2019 Andrey Semashev<p>
49        Distributed under the Boost Software License, Version 1.0. (See accompanying
50        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>).
51      </p>
52</div></td>
53</tr></table>
54<hr>
55<div class="spirit-nav">
56<a accesskey="p" href="why_not_lazy_streaming.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../rationale.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="fork_support.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
57</div>
58</body>
59</html>
60