Return-Path: X-Original-To: apmail-logging-commits-archive@minotaur.apache.org Delivered-To: apmail-logging-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 00B97D0A8 for ; Sat, 6 Oct 2012 18:24:36 +0000 (UTC) Received: (qmail 60556 invoked by uid 500); 6 Oct 2012 18:24:36 -0000 Delivered-To: apmail-logging-commits-archive@logging.apache.org Received: (qmail 60531 invoked by uid 500); 6 Oct 2012 18:24:36 -0000 Mailing-List: contact commits-help@logging.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@logging.apache.org Delivered-To: mailing list commits@logging.apache.org Received: (qmail 60523 invoked by uid 99); 6 Oct 2012 18:24:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Oct 2012 18:24:36 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Oct 2012 18:24:35 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 47DA023888FE; Sat, 6 Oct 2012 18:23:52 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1395143 - /logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/CollectionLoggingTest.java Date: Sat, 06 Oct 2012 18:23:52 -0000 To: commits@logging.apache.org From: ggregory@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121006182352.47DA023888FE@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ggregory Date: Sat Oct 6 18:23:51 2012 New Revision: 1395143 URL: http://svn.apache.org/viewvc?rev=1395143&view=rev Log: Work in progress. Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/CollectionLoggingTest.java Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/CollectionLoggingTest.java URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/CollectionLoggingTest.java?rev=1395143&r1=1395142&r2=1395143&view=diff ============================================================================== --- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/CollectionLoggingTest.java (original) +++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/CollectionLoggingTest.java Sat Oct 6 18:23:51 2012 @@ -19,9 +19,12 @@ package org.apache.logging.log4j.core; import java.net.NetworkInterface; import java.net.SocketException; import java.nio.charset.Charset; +import java.util.HashMap; +import java.util.Map; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.message.MapMessage; import org.junit.Test; /** @@ -33,6 +36,18 @@ public class CollectionLoggingTest { public void testSystemProperties() { Logger logger = LogManager.getLogger(CollectionLoggingTest.class.getName()); logger.error(System.getProperties()); + // logger.error(new MapMessage(System.getProperties())); + } + + @Test + public void testSimpleMap() { + Logger logger = LogManager.getLogger(CollectionLoggingTest.class.getName()); + logger.error(System.getProperties()); + Map map = new HashMap(); + map.put("MyKey1", "MyValue1"); + map.put("MyKey2", "MyValue2"); + logger.error(new MapMessage(map)); + logger.error(map); } @Test