You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by sw...@apache.org on 2023/12/12 01:10:42 UTC

(logging-log4cxx) branch master updated: Correct errors in the documentation (#313)

This is an automated email from the ASF dual-hosted git repository.

swebb2066 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git


The following commit(s) were added to refs/heads/master by this push:
     new 5a3bb3b0 Correct errors in the documentation (#313)
5a3bb3b0 is described below

commit 5a3bb3b0b067e211c3409d11d6b96e3e4effa224
Author: Stephen Webb <st...@ieee.org>
AuthorDate: Tue Dec 12 12:10:37 2023 +1100

    Correct errors in the documentation (#313)
---
 src/main/include/log4cxx/net/syslogappender.h |   2 +-
 src/site/images/log4cxx-flow.png              | Bin 77275 -> 64805 bytes
 src/site/log4cxx-flow.drawio                  |  61 ++++++++++++++++----------
 src/site/markdown/log-flow.md                 |   8 ++--
 4 files changed, 45 insertions(+), 26 deletions(-)

diff --git a/src/main/include/log4cxx/net/syslogappender.h b/src/main/include/log4cxx/net/syslogappender.h
index 7f0d1093..26a290f4 100644
--- a/src/main/include/log4cxx/net/syslogappender.h
+++ b/src/main/include/log4cxx/net/syslogappender.h
@@ -93,7 +93,7 @@ class LOG4CXX_EXPORT SyslogAppender : public AppenderSkeleton
 
 		\anchor sysLogAddress (1) A valid internet address, optionally with the port number as a suffix after a ':'.
 
-		\anchor facility (2) One of kern,user,mail,daemon,auth,syslog,lpr,news,uucp,cron,ftp,local0,local1,local2,local3,local4,local5,local6,local7 2. Provided by the derived class.
+		\anchor facility (2) One of kern,user,mail,daemon,auth,syslog,lpr,news,uucp,cron,ftp,local0,local1,local2,local3,local4,local5,local6,local7
 
 		\sa AppenderSkeleton::setOption()
 		*/
diff --git a/src/site/images/log4cxx-flow.png b/src/site/images/log4cxx-flow.png
index 73d55e75..0c0999f9 100644
Binary files a/src/site/images/log4cxx-flow.png and b/src/site/images/log4cxx-flow.png differ
diff --git a/src/site/log4cxx-flow.drawio b/src/site/log4cxx-flow.drawio
index 6fd77aca..007c4941 100644
--- a/src/site/log4cxx-flow.drawio
+++ b/src/site/log4cxx-flow.drawio
@@ -1,6 +1,6 @@
-<mxfile host="app.diagrams.net" modified="2023-12-06T22:01:10.298Z" agent="Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0" etag="GWKIO4Cc-Fpw4qUow2BO" version="22.1.7" type="device">
+<mxfile host="app.diagrams.net" modified="2023-12-11T03:47:23.769Z" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36" etag="tySYe_oGCXP_Q_6PRUdm" version="22.1.7" type="device">
   <diagram id="C5RBs43oDa-KdzZeNtuy" name="Page-1">
-    <mxGraphModel dx="1434" dy="822" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
+    <mxGraphModel dx="1194" dy="742" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
       <root>
         <mxCell id="WIyWlLk6GJQsqaUBKTNV-0" />
         <mxCell id="WIyWlLk6GJQsqaUBKTNV-1" parent="WIyWlLk6GJQsqaUBKTNV-0" />
@@ -38,66 +38,66 @@
           </mxGeometry>
         </mxCell>
         <mxCell id="WIyWlLk6GJQsqaUBKTNV-10" value="&lt;div&gt;Level enabled&lt;/div&gt;" style="rhombus;whiteSpace=wrap;html=1;shadow=0;fontFamily=Helvetica;fontSize=12;align=center;strokeWidth=1;spacing=6;spacingTop=-4;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
-          <mxGeometry x="145" y="410" width="150" height="120" as="geometry" />
+          <mxGeometry x="145" y="400" width="150" height="120" as="geometry" />
         </mxCell>
         <mxCell id="WIyWlLk6GJQsqaUBKTNV-12" value="Message not logged" style="rounded=1;whiteSpace=wrap;html=1;fontSize=12;glass=0;strokeWidth=1;shadow=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
-          <mxGeometry x="505" y="440" width="130" height="60" as="geometry" />
+          <mxGeometry x="505" y="430" width="130" height="60" as="geometry" />
         </mxCell>
-        <mxCell id="oChkvwbR2C9QrrlvOqCN-3" value="Message logged" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
+        <mxCell id="oChkvwbR2C9QrrlvOqCN-3" value="Message logged" style="rounded=1;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
           <mxGeometry x="160" y="1050" width="120" height="60" as="geometry" />
         </mxCell>
-        <mxCell id="oChkvwbR2C9QrrlvOqCN-10" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="oChkvwbR2C9QrrlvOqCN-6" target="oChkvwbR2C9QrrlvOqCN-8">
+        <mxCell id="oChkvwbR2C9QrrlvOqCN-10" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="Ph8_yWvhTQ9_spNeMV8O-0" target="oChkvwbR2C9QrrlvOqCN-8" edge="1">
           <mxGeometry relative="1" as="geometry" />
         </mxCell>
-        <mxCell id="oChkvwbR2C9QrrlvOqCN-6" value="Give log message to each appender" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
-          <mxGeometry x="160" y="630" width="120" height="60" as="geometry" />
+        <mxCell id="oChkvwbR2C9QrrlvOqCN-6" value="Give logging event to each appender" style="rounded=1;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
+          <mxGeometry x="160" y="560" width="120" height="60" as="geometry" />
         </mxCell>
-        <mxCell id="oChkvwbR2C9QrrlvOqCN-11" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="oChkvwbR2C9QrrlvOqCN-8" target="oChkvwbR2C9QrrlvOqCN-3">
+        <mxCell id="oChkvwbR2C9QrrlvOqCN-11" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="oChkvwbR2C9QrrlvOqCN-8" target="oChkvwbR2C9QrrlvOqCN-3" edge="1">
           <mxGeometry relative="1" as="geometry" />
         </mxCell>
-        <mxCell id="oChkvwbR2C9QrrlvOqCN-12" value="No" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="oChkvwbR2C9QrrlvOqCN-11">
+        <mxCell id="oChkvwbR2C9QrrlvOqCN-12" value="No" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="oChkvwbR2C9QrrlvOqCN-11" vertex="1" connectable="0">
           <mxGeometry x="-0.2364" relative="1" as="geometry">
             <mxPoint x="10" as="offset" />
           </mxGeometry>
         </mxCell>
-        <mxCell id="oChkvwbR2C9QrrlvOqCN-13" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="oChkvwbR2C9QrrlvOqCN-8" target="oChkvwbR2C9QrrlvOqCN-15">
+        <mxCell id="oChkvwbR2C9QrrlvOqCN-13" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="oChkvwbR2C9QrrlvOqCN-8" target="oChkvwbR2C9QrrlvOqCN-15" edge="1">
           <mxGeometry relative="1" as="geometry">
             <mxPoint x="460" y="855" as="targetPoint" />
           </mxGeometry>
         </mxCell>
-        <mxCell id="oChkvwbR2C9QrrlvOqCN-14" value="Yes" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="oChkvwbR2C9QrrlvOqCN-13">
+        <mxCell id="oChkvwbR2C9QrrlvOqCN-14" value="Yes" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="oChkvwbR2C9QrrlvOqCN-13" vertex="1" connectable="0">
           <mxGeometry x="0.2031" y="-1" relative="1" as="geometry">
             <mxPoint x="-10" y="-16" as="offset" />
           </mxGeometry>
         </mxCell>
-        <mxCell id="oChkvwbR2C9QrrlvOqCN-8" value="Appender has filters" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
+        <mxCell id="oChkvwbR2C9QrrlvOqCN-8" value="Appender has filters" style="rhombus;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
           <mxGeometry x="155" y="790" width="130" height="130" as="geometry" />
         </mxCell>
-        <mxCell id="oChkvwbR2C9QrrlvOqCN-16" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="oChkvwbR2C9QrrlvOqCN-15" target="oChkvwbR2C9QrrlvOqCN-3">
+        <mxCell id="oChkvwbR2C9QrrlvOqCN-16" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="oChkvwbR2C9QrrlvOqCN-15" target="oChkvwbR2C9QrrlvOqCN-3" edge="1">
           <mxGeometry relative="1" as="geometry" />
         </mxCell>
-        <mxCell id="oChkvwbR2C9QrrlvOqCN-17" value="&lt;div&gt;Accept Message / &lt;br&gt;&lt;/div&gt;&lt;div&gt;No more filters&lt;br&gt;&lt;/div&gt;" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="oChkvwbR2C9QrrlvOqCN-16">
+        <mxCell id="oChkvwbR2C9QrrlvOqCN-17" value="&lt;div&gt;Accept Message / &lt;br&gt;&lt;/div&gt;&lt;div&gt;No more filters&lt;br&gt;&lt;/div&gt;" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="oChkvwbR2C9QrrlvOqCN-16" vertex="1" connectable="0">
           <mxGeometry x="0.0204" y="2" relative="1" as="geometry">
             <mxPoint x="-10" y="-22" as="offset" />
           </mxGeometry>
         </mxCell>
-        <mxCell id="oChkvwbR2C9QrrlvOqCN-18" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="oChkvwbR2C9QrrlvOqCN-15" target="oChkvwbR2C9QrrlvOqCN-20">
+        <mxCell id="oChkvwbR2C9QrrlvOqCN-18" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="oChkvwbR2C9QrrlvOqCN-15" target="oChkvwbR2C9QrrlvOqCN-20" edge="1">
           <mxGeometry relative="1" as="geometry">
             <mxPoint x="780" y="975" as="targetPoint" />
           </mxGeometry>
         </mxCell>
-        <mxCell id="oChkvwbR2C9QrrlvOqCN-19" value="&lt;div&gt;Reject message&lt;/div&gt;" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="oChkvwbR2C9QrrlvOqCN-18">
+        <mxCell id="oChkvwbR2C9QrrlvOqCN-19" value="&lt;div&gt;Reject message&lt;/div&gt;" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="oChkvwbR2C9QrrlvOqCN-18" vertex="1" connectable="0">
           <mxGeometry x="0.3918" y="-3" relative="1" as="geometry">
             <mxPoint x="-25" y="-18" as="offset" />
           </mxGeometry>
         </mxCell>
-        <mxCell id="oChkvwbR2C9QrrlvOqCN-15" value="Check if next filter accepts or rejects message" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
-          <mxGeometry x="400" y="890" width="170" height="170" as="geometry" />
+        <mxCell id="oChkvwbR2C9QrrlvOqCN-15" value="Check if next filter accepts or rejects logging event" style="rhombus;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
+          <mxGeometry x="390" y="890" width="190" height="170" as="geometry" />
         </mxCell>
-        <mxCell id="oChkvwbR2C9QrrlvOqCN-20" value="Message not logged" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
+        <mxCell id="oChkvwbR2C9QrrlvOqCN-20" value="Message not logged" style="rounded=1;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
           <mxGeometry x="700" y="945" width="120" height="60" as="geometry" />
         </mxCell>
-        <mxCell id="oChkvwbR2C9QrrlvOqCN-23" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="oChkvwbR2C9QrrlvOqCN-15" target="oChkvwbR2C9QrrlvOqCN-15">
+        <mxCell id="oChkvwbR2C9QrrlvOqCN-23" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="oChkvwbR2C9QrrlvOqCN-15" target="oChkvwbR2C9QrrlvOqCN-15" edge="1">
           <mxGeometry relative="1" as="geometry">
             <Array as="points">
               <mxPoint x="340" y="975" />
@@ -105,11 +105,28 @@
             </Array>
           </mxGeometry>
         </mxCell>
-        <mxCell id="oChkvwbR2C9QrrlvOqCN-24" value="Neutral" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="oChkvwbR2C9QrrlvOqCN-23">
+        <mxCell id="oChkvwbR2C9QrrlvOqCN-24" value="Neutral" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="oChkvwbR2C9QrrlvOqCN-23" vertex="1" connectable="0">
           <mxGeometry x="-0.2424" y="-4" relative="1" as="geometry">
             <mxPoint x="16" as="offset" />
           </mxGeometry>
         </mxCell>
+        <object label="" id="Ph8_yWvhTQ9_spNeMV8O-2">
+          <mxCell value="Yes" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="Ph8_yWvhTQ9_spNeMV8O-0" target="Ph8_yWvhTQ9_spNeMV8O-1" edge="1">
+            <mxGeometry relative="1" as="geometry" />
+          </mxCell>
+        </object>
+        <mxCell id="Ph8_yWvhTQ9_spNeMV8O-1" value="Message not logged" style="rounded=1;whiteSpace=wrap;html=1;fontSize=12;glass=0;strokeWidth=1;shadow=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
+          <mxGeometry x="510" y="675" width="130" height="60" as="geometry" />
+        </mxCell>
+        <mxCell id="Ph8_yWvhTQ9_spNeMV8O-3" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="oChkvwbR2C9QrrlvOqCN-6" target="Ph8_yWvhTQ9_spNeMV8O-0" edge="1">
+          <mxGeometry relative="1" as="geometry">
+            <mxPoint x="220" y="620" as="sourcePoint" />
+            <mxPoint x="220" y="790" as="targetPoint" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="Ph8_yWvhTQ9_spNeMV8O-0" value="Logging event&#39;s level less than appender&#39;s threshold" style="rhombus;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
+          <mxGeometry x="115.61999999999999" y="650" width="208.75" height="110" as="geometry" />
+        </mxCell>
       </root>
     </mxGraphModel>
   </diagram>
diff --git a/src/site/markdown/log-flow.md b/src/site/markdown/log-flow.md
index 76f8b49a..688908f3 100644
--- a/src/site/markdown/log-flow.md
+++ b/src/site/markdown/log-flow.md
@@ -27,10 +27,11 @@ Messages are logged as follows:
 enabled.  If the macro is not enabled(for example by setting the `LOG4CXX_THRESHOLD`
 macro), then the log message is not compiled in and the line of code becomes
 a no-op.
-2. The logger level is checked to see if the current level is enabled.  If
+2. The logger level is checked to see if the request level is enabled.  If
 it is, the message is then sent to the logger.
 3. The logger creates a new message and gives it to all of its appenders.
-4. Each appender checks its filters to see if the message should be logged.
+4. Each appender checks the logging event's level is greater or equal to the appender's threshold level.
+5. Each appender checks its filters to see if the message should be logged.
 
 Filters can perform the following actions:
 
@@ -41,7 +42,8 @@ consulting any remaining filters
 3. Neutral: This filter neither rejects nor accepts the message, it will
 be passed on to the next filter in the chain
 
-If no filter rejects or accepts the message, the message will be logged.
+If a filter accepts the message, the message will be logged.
+If no filter rejects the message, the message will be logged.
 
 The following flow diagram shows how messages flow through the system: