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 2777911476 for ; Thu, 28 Aug 2014 09:16:03 +0000 (UTC) Received: (qmail 84783 invoked by uid 500); 28 Aug 2014 09:16:01 -0000 Delivered-To: apmail-logging-log4j-user-archive@logging.apache.org Received: (qmail 84742 invoked by uid 500); 28 Aug 2014 09:16:01 -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 84730 invoked by uid 99); 28 Aug 2014 09:16:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Aug 2014 09:16:01 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of cguillaume@hotpads.com designates 209.85.213.46 as permitted sender) Received: from [209.85.213.46] (HELO mail-yh0-f46.google.com) (209.85.213.46) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Aug 2014 09:15:57 +0000 Received: by mail-yh0-f46.google.com with SMTP id t59so306043yho.5 for ; Thu, 28 Aug 2014 02:15:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=ztXFme8nv7OJieOIZUUWuU4pJV8S7pyTMSDkYaq8SXs=; b=av0pBdEtN78n7IglmGg4WcnIu8LrFJfdCXf3WsVGAi28/nkOoIfRKG2Z0J8B35en9a rEvxNGW2D4GJVvOtEqeO8nYyeTikNjLej1Yj+NI4kxyQFYyAMWU4D4zG77iFruBoILQH uR1XS57KEQ5M4CkPSSRTVf6FO7N8Pe0SkFZ1lT9eFQVcXiiqm5yuXkbLHxpH9T7N3w7M ryEOeoLDeN1js9wx5Tyf/6Fe4XJtrbzFI28VzKdShWihoSZMr3oHNnNwVmdGOpYppxf5 HpmMyCfAPv/ErgCH1dJLSeI3lTqPdOn1zhA/Hpqeo0hdBbf1oLlIE7JU6svDGskLwyQZ 6m9A== X-Gm-Message-State: ALoCoQlsv4E3gLxKGQoWozUKZ4O9f9wVZMkvdiGjLG+E7n+61e42sHLpVndUCpuFC15FiWnQp3m8 MIME-Version: 1.0 X-Received: by 10.236.149.134 with SMTP id x6mr9011002yhj.149.1409217335475; Thu, 28 Aug 2014 02:15:35 -0700 (PDT) Received: by 10.170.211.197 with HTTP; Thu, 28 Aug 2014 02:15:35 -0700 (PDT) In-Reply-To: References: Date: Thu, 28 Aug 2014 02:15:35 -0700 Message-ID: Subject: Re: Appenders From: =?UTF-8?Q?Cl=C3=A9ment_Guillaume?= To: Log4J Users List Content-Type: multipart/alternative; boundary=20cf303a2fb9b15d2e0501acfa18 X-Virus-Checked: Checked by ClamAV on apache.org --20cf303a2fb9b15d2e0501acfa18 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Yes, I'm programmatically adding appenders. I understand the point of view. And what about having access to the properties of the appender as the target of the ConsoleLogger? I know that this property is wrapped into an OutputStream and into a OutputStreamManager but I think it could be nice to have access to it from the ConsoleAppender. Cl=C3=A9ment On Wed, Aug 27, 2014 at 6:43 PM, Matt Sicker wrote: > Are you programmatically adding the Appender? > > I suggest the reconfiguration method because it allows for gracefully > switching to a new configuration. Some appenders need fields to remain > immutable for performance or safety reasons, so creating a new Appender o= n > reconfigure is generally the safer option. > > > On 26 August 2014 02:43, Cl=C3=A9ment Guillaume = wrote: > > > Yes, I know that. > > So if I have 10 LoggerConfigs that use the same Appender and I want to > > change a property of this Appender, I should create a new one and updat= e > > the appender list (remove the old one and add the new one) of my 10 > > LoggerConfigs? > > There isn't a simpler way, is there? > > > > Cl=C3=A9ment > > > > > > On Mon, Aug 25, 2014 at 8:58 PM, Matt Sicker wrote: > > > > > If you reconfigure Log4j at runtime, you can switch over to a new > > > LoggerConfig without losing any messages. If you're holding direct > > > references to LoggerConfig, you should probably step back a level and > get > > > that on demand instead. > > > > > > > > > On 25 August 2014 14:22, Cl=C3=A9ment Guillaume > > wrote: > > > > > > > Hi, > > > > > > > > I would love to have a direct access to the target of a > ConsoleAppender > > > (as > > > > I can directly get the fileName of a FileAppender). Do you plan to > > > > implement this feature ? (and also for others properties like > > > > ConsoleAppender.isFollow or FileAppender.immediateFlush, ...) > > > > > > > > > > > > I also would love to be able to dynamically update thess properties= . > I > > > > don't think it is currently possible. > > > > Or at least I would like to be able to replace an Appender in the > > > > Configuration (by a new one) without removing the Appender from all > the > > > > previously associated LoggerConfig. > > > > > > > > Regards, > > > > > > > > Cl=C3=A9ment > > > > > > > > > > > > > > > > -- > > > Matt Sicker > > > > > > > > > -- > Matt Sicker > --20cf303a2fb9b15d2e0501acfa18--