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 64ED318F34 for ; Wed, 17 Jun 2015 15:24:00 +0000 (UTC) Received: (qmail 42601 invoked by uid 500); 17 Jun 2015 15:24:00 -0000 Delivered-To: apmail-logging-log4j-user-archive@logging.apache.org Received: (qmail 42550 invoked by uid 500); 17 Jun 2015 15:24:00 -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 42536 invoked by uid 99); 17 Jun 2015 15:24:00 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Jun 2015 15:24:00 +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 8ED09182238 for ; Wed, 17 Jun 2015 15:23:59 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.9 X-Spam-Level: ** X-Spam-Status: No, score=2.9 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 3lfIS9Mh0WEo for ; Wed, 17 Jun 2015 15:23:47 +0000 (UTC) Received: from mail-oi0-f53.google.com (mail-oi0-f53.google.com [209.85.218.53]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 603BF43A5B for ; Wed, 17 Jun 2015 15:23:47 +0000 (UTC) Received: by oiax193 with SMTP id x193so36728438oia.2 for ; Wed, 17 Jun 2015 08:23:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=VG+qge60EXQP8d6rrV4e8QlJ/74mSLEGxFLPCsVCzww=; b=RwPLoQtMcyWyq75NVaGlSd9g9wa/xqXomLxejQghVIre06G22waxS+TMaW2mSedytP jswt+ainF0DaQGG4I0VvzpVF/31hbHfNoEAejwSnP7LDCvjAnpMqsCW4uSqPBqRirW/O xngHC0cC8xR7uGnGW9oB09I2nbYSN4XFWNggvqgjlOkT6heQsY1KEF+V6mUTswEKA8s/ dTuvoUjIKQzHyI4CF7CiD+xmsExlJFB0iQtLDYoYD+cWzj+NKAzIIOr5PD0gKHCzSndK yNwrT+A/GNewp6Bxo1AN++lF9aZjuIdVmGreSnP1q3kYCp8byFzhztEv45uuyMGNBzRZ xK9A== MIME-Version: 1.0 X-Received: by 10.60.92.198 with SMTP id co6mr5069097oeb.3.1434554620997; Wed, 17 Jun 2015 08:23:40 -0700 (PDT) Received: by 10.182.233.1 with HTTP; Wed, 17 Jun 2015 08:23:40 -0700 (PDT) In-Reply-To: References: <847955C9-D165-4CB6-A5E7-4080FAF3F833@dslextreme.com> Date: Thu, 18 Jun 2015 00:23:40 +0900 Message-ID: Subject: Re: how to reinitialize log4j2 configuration? From: Remko Popma To: Log4J Users List Content-Type: multipart/alternative; boundary=047d7b33d5449877c00518b846cf --047d7b33d5449877c00518b846cf Content-Type: text/plain; charset=UTF-8 I added this (and two more questions) to the FAQ. Please verify if I got the LogManager.getContext(TRUE/FALSE) parameter right... On Wed, Jun 17, 2015 at 7:49 AM, Gary Gregory wrote: > Is this an item for our FAQ or manual? It would be nice to eventually be > able to answer these kinds of questions with links to the site. :-) > > G > > On Tue, Jun 16, 2015 at 2:44 PM, Benjamin Jaton > wrote: > > > This works great thanks! > > > > On Fri, Jun 5, 2015 at 9:22 PM, Ralph Goers > > wrote: > > > > > Once you have a LoggerContext you can call > > > context.setConfigLocation(configLocation) where configLocation is a > URI. > > > That will force a reconfiguration. > > > > > > Ralph > > > > > > > On Jun 5, 2015, at 4:33 PM, Benjamin Jaton > > > > wrote: > > > > > > > > Hello > > > > > > > > After an initial configuration of log4j2 with: > > > > > > > > Configurator.initialize(null, configLocation); > > > > > > > > I would like to reinitialize it with a different URL > > > > > > > > Configurator.initialize(null, configLocation2); > > > > > > > > The problem is that the second call is ignored. I believe that once > the > > > > LoggerContext is STARTED it will ignore reconfigurations. > > > > > > > > Is there a way to do this? > > > > > > > > Thanks! > > > > Ben > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org > > > For additional commands, e-mail: log4j-user-help@logging.apache.org > > > > > > > > > > > > -- > E-Mail: garydgregory@gmail.com | ggregory@apache.org > Java Persistence with Hibernate, Second Edition > > JUnit in Action, Second Edition > Spring Batch in Action > Blog: http://garygregory.wordpress.com > Home: http://garygregory.com/ > Tweet! http://twitter.com/GaryGregory > --047d7b33d5449877c00518b846cf--