ppkarwasz commented on code in PR #2584: URL: https://github.com/apache/logging-log4j2/pull/2584#discussion_r1609689008
########## src/site/antora/modules/ROOT/pages/manual/markers.adoc: ########## @@ -16,85 +16,115 @@ //// = Markers -One of the primary purpose of a logging framework is to provide the -means to generate debugging and diagnostic information only when it is -needed, and to allow filtering of that information so that it does not -overwhelm the system or the individuals who need to make use of it. As -an example, an application desires to log its entry, exit and other -operations separately from SQL statements being executed, and wishes to -be able to log queries separate from updates. One way to accomplish this -is shown below: - -[source,java] +Markers allow "tag" log statements with a `Marker` object, labeling them +as belonging to a specific type. For example, developers can use markers to tag +log statements related to a particular subsystem or functionality. + +By using markers, it is possible to filter log statements based on the `Marker` +and display only those log statements that are of interest, such as those +related to XML processing or SQL queries. + +Markers offer more fine-grained control over log filtering beyond log levels or package names. + +[#create] +== Creating Markers + +To create a Marker, use the MarkerManager class. The MarkerManager class provides +a factory method to create a Marker object is used to tag log statements. + +[source, java] +---- +Marker SQL_MARKER = MarkerManager.getMarker("SQL"); Review Comment: Fixed in 13afdaf3d9b18368ddbf363884aff208f1633852 I was not able to make the attachments idea work, but I included links to the Github repo. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org