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 C465EC76E for ; Mon, 5 Jan 2015 13:53:41 +0000 (UTC) Received: (qmail 13422 invoked by uid 500); 5 Jan 2015 13:53:42 -0000 Delivered-To: apmail-logging-log4j-user-archive@logging.apache.org Received: (qmail 13371 invoked by uid 500); 5 Jan 2015 13:53:42 -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 13360 invoked by uid 99); 5 Jan 2015 13:53:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Jan 2015 13:53:42 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of apache@elyograg.org designates 166.70.79.219 as permitted sender) Received: from [166.70.79.219] (HELO frodo.elyograg.org) (166.70.79.219) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Jan 2015 13:53:38 +0000 Received: from localhost (localhost [127.0.0.1]) by frodo.elyograg.org (Postfix) with ESMTP id 3A83A27A3 for ; Mon, 5 Jan 2015 06:53:16 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=elyograg.org; h= content-transfer-encoding:content-type:content-type:in-reply-to :references:subject:subject:mime-version:user-agent:from:from :date:date:message-id:received:received; s=mail; t=1420465994; bh=RDpq1eTP16yEPr1NWfg0Pj1H5q+8ZVyEEO2LkxXxVSg=; b=Tu74ZSv95N1v Zxxpi2Pr6IF1QAHCRvoDbHjaONBBUPtCaPP+v8hcjJhn7quDkougPbFkb7YDjdh0 Y/vtT4fV1tLkHBhtIqtayN8yeZc6Akws6V0Ofg63O2FSlkeO8GR+59y7M/MmkYoM xfPh73zQlWLC4QkSj7kz9409xacfOcM= X-Virus-Scanned: Debian amavisd-new at frodo.elyograg.org Received: from frodo.elyograg.org ([127.0.0.1]) by localhost (frodo.elyograg.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id yHn5NIFPvl+5 for ; Mon, 5 Jan 2015 06:53:14 -0700 (MST) Received: from [192.168.1.102] (102.int.elyograg.org [192.168.1.102]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: elyograg@elyograg.org) by frodo.elyograg.org (Postfix) with ESMTPSA id 86B57223D for ; Mon, 5 Jan 2015 06:53:14 -0700 (MST) Message-ID: <54AA9745.2070201@elyograg.org> Date: Mon, 05 Jan 2015 06:53:09 -0700 From: Shawn Heisey User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Log4J Users List Subject: Re: Redirect log4j to JUL References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On 1/4/2015 11:13 PM, Goran Karlic wrote: > How can I configure log4j to redirect output to java.util.logging? One way to do this (and it might be the only way) is to use slf4j for your logging, and bind JUL as the logging destination. The slf4j download includes what I call "intercept" jars -- jars that implement other logging classes like log4j, commons logging, JUL, etc, and redirect the logs into slf4j so that they are handled by whatever binding you have chosen. As long as the logs you need to redirect are log4j 1.x, this is possible with software from www.slf4j.org. There may be a jar within the log4j 2.x download that will work with version 2.x, but I'm not entirely sure. Here's some documentation I wrote for the Solr project on the topic of intercept jars: http://wiki.apache.org/solr/SolrLogging#A_note_about_SLF4J_intercept_jars Thanks, Shawn --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-user-help@logging.apache.org