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