Return-Path: X-Original-To: apmail-logging-log4j-dev-archive@www.apache.org Delivered-To: apmail-logging-log4j-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5D9EA18B95 for ; Tue, 23 Feb 2016 20:31:18 +0000 (UTC) Received: (qmail 95762 invoked by uid 500); 23 Feb 2016 20:31:18 -0000 Delivered-To: apmail-logging-log4j-dev-archive@logging.apache.org Received: (qmail 95669 invoked by uid 500); 23 Feb 2016 20:31:18 -0000 Mailing-List: contact log4j-dev-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Developers List" Reply-To: "Log4J Developers List" Delivered-To: mailing list log4j-dev@logging.apache.org Received: (qmail 95644 invoked by uid 99); 23 Feb 2016 20:31:18 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Feb 2016 20:31:18 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 1B8742C1F5B for ; Tue, 23 Feb 2016 20:31:18 +0000 (UTC) Date: Tue, 23 Feb 2016 20:31:18 +0000 (UTC) From: "Remko Popma (JIRA)" To: log4j-dev@logging.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (LOG4J2-1297) Document "gc-free" configuration and performance MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LOG4J2-1297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15159593#comment-15159593 ] Remko Popma commented on LOG4J2-1297: ------------------------------------- I don't see an easy way to handle LOG4J2-1282 at the moment. An additional complication is that StrSubstitutor is involved, and that class is not exactly GC-free... > Document "gc-free" configuration and performance > ------------------------------------------------ > > Key: LOG4J2-1297 > URL: https://issues.apache.org/jira/browse/LOG4J2-1297 > Project: Log4j 2 > Issue Type: New Feature > Components: Documentation > Affects Versions: 2.5 > Reporter: Remko Popma > Assignee: Remko Popma > > Update the site with a description of which configurations are GC-free (i.e., that don't create temporary objects in steady running state). > Currently that means > * Loggers are all asynchronous (Log4jContextSelector is set to org.apache.logging.log4j.core.async.AsyncLoggerContextSelector) > * the configuration does not contain a section > * the "steady-state" appenders are either RandomAccessFile or RollingRandomAccessFile Appenders (logging to any other appender will cause temporary objects to be created - including ConsoleAppender) > * the Layout is a PatternLayout that uses one of the pre-defined date formats, does not have any regular expression replacements, and does not have lookups (TODO: may need to restrict this further) > * in user code, when logging a parameterized message, the number of parameters is no more than ... (TBD pending discussion in LOG4J2-1278) > * in user code, when logging a parameterized message, parameters of primitive type are boxed in a reused StringBuilder (Log4j provides a utility to make this relatively painless) > Furthermore, we need to explain that some of this functionality depends on ThreadLocals and so is disabled by default in web applications to prevent memory leaks. The page should also explain how to manually switch off the use of ThreadLocals. > Finally, the page should show a performance test comparison similar to the [performance section|http://logging.apache.org/log4j/2.x/manual/async.html#Performance] on the Async Loggers page. I'm thinking a comparison between Logback, Log4j-1, Log4j-2.0, Log4j-2.6 "classic" and Log4j-2.6 "gc-free" would be ideal. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-dev-help@logging.apache.org