Return-Path: X-Original-To: apmail-logging-log4j-user-archive@www.apache.org Delivered-To: apmail-logging-log4j-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 94BA5180FA for ; Mon, 28 Mar 2016 08:35:55 +0000 (UTC) Received: (qmail 80802 invoked by uid 500); 28 Mar 2016 08:35:55 -0000 Delivered-To: apmail-logging-log4j-user-archive@logging.apache.org Received: (qmail 80739 invoked by uid 500); 28 Mar 2016 08:35:55 -0000 Mailing-List: contact log4j-user-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Users List" Reply-To: "Log4J Users List" Delivered-To: mailing list log4j-user@logging.apache.org Received: (qmail 80728 invoked by uid 99); 28 Mar 2016 08:35:55 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Mar 2016 08:35:55 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 9767E180227 for ; Mon, 28 Mar 2016 08:35:54 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.278 X-Spam-Level: * X-Spam-Status: No, score=1.278 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=disabled Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 0BLfk465gBBJ for ; Mon, 28 Mar 2016 08:35:52 +0000 (UTC) Received: from BAY004-OMC3S12.hotmail.com (bay004-omc3s12.hotmail.com [65.54.190.150]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id 61D7E5F23B for ; Mon, 28 Mar 2016 08:35:51 +0000 (UTC) Received: from BAY181-DS16 ([65.54.190.189]) by BAY004-OMC3S12.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Mon, 28 Mar 2016 01:35:44 -0700 X-TMN: [SlAhJlAymHeB31Qcs6L1W2zHEMO5NLFnSMM0Hi+cV0U=] X-Originating-Email: [maple.feng.wang@hotmail.com] Message-ID: From: Maple Wang To: Subject: is there any way to add a marker to a logger rather than a log Date: Mon, 28 Mar 2016 16:35:42 +0800 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_002D_01D1890F.DEBB8100" X-Mailer: Microsoft Outlook 14.0 Thread-Index: AdGIywHFY+HR3N6XTjWtbUvRifNZrA== Content-Language: en-us X-OriginalArrivalTime: 28 Mar 2016 08:35:44.0394 (UTC) FILETIME=[D1BC4EA0:01D188CC] ------=_NextPart_000_002D_01D1890F.DEBB8100 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, Marker is great feature for classifying and filtering log content, but I have a question about how to use marker in logging API. In official guide for log4j2.x, normally, we need to do as blow: Marker myMarker = MarkerManager.getMarker("myMarker"); LOGGER.info(myMarker,"some log message"); This is good, but in my situation, I want to add a marker directly to a LOGGER, then, every time user use "LOGGER.info("some log message");", the marker will be added automatically. Is there any way to help me to achieve this? Thanks in advance. Best regards. ------=_NextPart_000_002D_01D1890F.DEBB8100--