1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.common.util.log4j.model;
17
18 import java.util.ArrayList;
19 import java.util.Arrays;
20 import java.util.List;
21
22 import javax.xml.bind.annotation.XmlAttribute;
23 import javax.xml.bind.annotation.XmlElement;
24
25 import org.kuali.common.util.CollectionUtils;
26
27
28
29
30 @Deprecated
31 public class Logger {
32
33 public static final Boolean DEFAULT_ADDITIVITY_VALUE = true;
34
35 Boolean additivity = DEFAULT_ADDITIVITY_VALUE;
36 String name;
37 List<AppenderRef> references = new ArrayList<AppenderRef>();
38 Level level;
39
40 public Logger() {
41 this((String) null);
42 }
43
44 public Logger(List<AppenderRef> references) {
45 this(null, references);
46 }
47
48 public Logger(AppenderRef reference, Level level) {
49 this(Arrays.asList(reference), level);
50 }
51
52 public Logger(List<AppenderRef> references, Level level) {
53 this(null, references, level);
54 }
55
56 public Logger(String name) {
57 this(name, (Level) null);
58 }
59
60 public Logger(String name, Level level) {
61 this(name, null, level);
62 }
63
64 public Logger(String name, List<AppenderRef> references) {
65 this(name, references, null);
66 }
67
68 public Logger(String name, List<AppenderRef> references, Level level) {
69 super();
70 this.name = name;
71 this.references = references;
72 this.level = level;
73 }
74
75 public Logger(Logger logger) {
76 super();
77 this.additivity = logger.getAdditivity();
78 this.name = logger.getName();
79 this.level = logger.getLevel();
80 for (AppenderRef reference : CollectionUtils.toEmptyList(logger.getReferences())) {
81 this.references.add(new AppenderRef(reference));
82 }
83 }
84
85 @XmlElement(name = "appender-ref")
86 public List<AppenderRef> getReferences() {
87 return references;
88 }
89
90 @XmlAttribute
91 public Boolean getAdditivity() {
92 return additivity;
93 }
94
95 @XmlAttribute
96 public String getName() {
97 return name;
98 }
99
100 public void setAdditivity(Boolean additivity) {
101 this.additivity = additivity;
102 }
103
104 public void setName(String name) {
105 this.name = name;
106 }
107
108 public void setReferences(List<AppenderRef> references) {
109 this.references = references;
110 }
111
112 public Level getLevel() {
113 return level;
114 }
115
116 public void setLevel(Level level) {
117 this.level = level;
118 }
119
120 }