From ac4bd0a7cdc67330ebb79ed610190d604717d830 Mon Sep 17 00:00:00 2001 From: Simon Kitching Date: Wed, 19 Apr 2006 09:33:50 +0000 Subject: [PATCH] The use of static Log objects may or may not be safe depending on how that code is intended to be deployed. It's therefore better for the examples to show the safest approach (without static fields). git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@395185 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/commons/logging/package.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/java/org/apache/commons/logging/package.html b/src/java/org/apache/commons/logging/package.html index ab03c66..cfde4f0 100644 --- a/src/java/org/apache/commons/logging/package.html +++ b/src/java/org/apache/commons/logging/package.html @@ -56,7 +56,7 @@ convention) after the calling class: public class Foo { - static Log log = LogFactory.getLog(Foo.class); + private Log log = LogFactory.getLog(Foo.class); public void foo() { ... @@ -221,7 +221,7 @@ import org.apache.commons.logging.LogFactory; public class MyComponent { - protected static Log log = + protected Log log = LogFactory.getLog(MyComponent.class); // Called once at startup time