Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 4DD09200BC2 for ; Thu, 17 Nov 2016 16:29:45 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 4D066160B0B; Thu, 17 Nov 2016 15:29:45 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 94216160AD8 for ; Thu, 17 Nov 2016 16:29:44 +0100 (CET) Received: (qmail 32273 invoked by uid 500); 17 Nov 2016 15:29:43 -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 32262 invoked by uid 99); 17 Nov 2016 15:29:43 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Nov 2016 15:29:43 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 23F24C010E for ; Thu, 17 Nov 2016 15:29:43 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.702 X-Spam-Level: X-Spam-Status: No, score=-0.702 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id D0R08CniZlC8 for ; Thu, 17 Nov 2016 15:29:42 +0000 (UTC) Received: from mx0a-00191d01.pphosted.com (mx0b-00191d01.pphosted.com [67.231.157.136]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 4B2DA5FC5F for ; Thu, 17 Nov 2016 15:29:42 +0000 (UTC) Received: from pps.filterd (m0083689.ppops.net [127.0.0.1]) by m0083689.ppops.net-00191d01. (8.16.0.17/8.16.0.17) with SMTP id uAHFOnGJ028222 for ; Thu, 17 Nov 2016 10:29:36 -0500 Received: from tlpd255.enaf.dadc.sbc.com (sbcsmtp3.sbc.com [144.160.112.28]) by m0083689.ppops.net-00191d01. with ESMTP id 26sf3erb7b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 17 Nov 2016 10:29:36 -0500 Received: from enaf.dadc.sbc.com (localhost [127.0.0.1]) by tlpd255.enaf.dadc.sbc.com (8.14.5/8.14.5) with ESMTP id uAHFTZYY128840 for ; Thu, 17 Nov 2016 09:29:35 -0600 Received: from dalint01.pst.cso.att.com (dalint01.pst.cso.att.com [135.31.133.159]) by tlpd255.enaf.dadc.sbc.com (8.14.5/8.14.5) with ESMTP id uAHFTV6O128809 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Thu, 17 Nov 2016 09:29:31 -0600 Received: from MOSTLS1MSGHUBAD.ITServices.sbc.com (MOSTLS1MSGHUBAD.itservices.sbc.com [135.41.4.151]) by dalint01.pst.cso.att.com (RSA Interceptor) for ; Thu, 17 Nov 2016 15:29:16 GMT Received: from MOSTLS1MSGUSRFG.ITServices.sbc.com ([169.254.7.101]) by MOSTLS1MSGHUBAD.ITServices.sbc.com ([135.41.4.151]) with mapi id 14.03.0319.002; Thu, 17 Nov 2016 09:29:12 -0600 From: "COHEN, STEVEN M" To: Log4J Users List Subject: Copying appenders and loggers from a confgiruation to a builder Thread-Topic: Copying appenders and loggers from a confgiruation to a builder Thread-Index: AdJA50Q1pK1YoucNRUy5kT2KdA6scQ== Date: Thu, 17 Nov 2016 15:29:11 +0000 Message-ID: <2A3405378AE6F24EA26ECBA87E42CEBB55278F9B@MOSTLS1MSGUSRFG.ITServices.sbc.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [134.85.25.161] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-RSA-Inspected: yes X-RSA-Classifications: public X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-11-17_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_policy_notspam policy=outbound_policy score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1611170273 archived-at: Thu, 17 Nov 2016 15:29:45 -0000 I am trying to construct a program that basically reads a bunch of log4j2 c= onfiguration files and combines them into one, writing this back to disk us= ing the new ConfigurationBuilder.writeXmlConfiguration(OutputStream) method= . =20 But I run up against what seems to me to be a gap in the API unless I am mi= ssing something: Having created a ConfigurationBuilder for the destination file and having r= ead one of the to-be-combined configuration files into a Configuration obje= ct, there appears to be nothing in the ConfigurationBuilder interface that = would allow, say, one of the appenders from the read-in configuration to be= copied, as a whole object,into the builder, short of deconstructing it dow= n to its constituent elements and adding them one by one. Is there a way to copy an appender from one configuration to another withou= t drilling down into all its constituent parts? And similarly, a way to co= py a logger from one configuration to another without drilling down to its = constituent parts? Or must I write all this code myself? --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-user-help@logging.apache.org