1
0

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
This commit is contained in:
Simon Kitching
2006-04-19 09:33:50 +00:00
parent a7349b8120
commit ac4bd0a7cd

View File

@@ -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