Clover coverage report - brownies library - 1.0-beta-1 Coverage timestamp: 月 8 16 2004 17:14:42 GMT+09:00 FRAMES NO FRAMES |
file stats: | LOC: | 106 |  | Methods: | 13
| NCLOC: | 50 |  | Classes: | 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
Source file | Conditionals | Statements | Methods | TOTAL
CascadeNamedLog.java | - | 0% | 0% | 0% |

1 |  |
     /*
2 |  |
      * Joey and its relative products are published under the terms
3 |  |
      * of the Apache Software License.
4 |  |
      */
5 |  |
     /*
6 |  |
      * Created on 2004/03/01
7 |  |
      */
8 |  |
     package org.asyrinx.brownie.core.log;
9 |  |
10 |  |
     import org.apache.commons.logging.LogFactory;
11 |  |
     import org.asyrinx.brownie.core.lang.ClassUtils;
12 |  |
13 |  |
     /**
14 |  |
      * @author akima
15 |  |
      */
16 |  |
     public class CascadeNamedLog extends DispatchLog {
17 |  |
18 |  |
         /**
19 |  |
          * @param loggerName
20 |  |
          */
21 | 0 |
         public CascadeNamedLog(String loggerName) {
22 | 0 |
             super(LogFactory.getLog(loggerName));
23 | 0 |
             this.loggerName = loggerName;
24 |  |
         }
25 |  |
26 |  |
         /**
27 |  |
          * @param loggerName
28 |  |
          */
29 | 0 |
         public CascadeNamedLog(Class class1) {
30 | 0 |
             this(class1.getName());
31 |  |
         }
32 |  |
33 |  |
         /**
34 |  |
          * @param log
35 |  |
          * @param defaultLevel
36 |  |
          */
37 | 0 |
         public CascadeNamedLog(String loggerName, String defaultLevel) {
38 | 0 |
             super(LogFactory.getLog(loggerName), defaultLevel);
39 | 0 |
             this.loggerName = loggerName;
40 |  |
         }
41 |  |
42 |  |
         /**
43 |  |
          * @param log
44 |  |
          * @param defaultLevel
45 |  |
          */
46 | 0 |
         public CascadeNamedLog(Class class1, String defaultLevel) {
47 | 0 |
             this(class1.getName(), defaultLevel);
48 |  |
         }
49 |  |
50 |  |
         private String loggerName;
51 |  |
52 |  |
         /**
53 |  |
          * @return
54 |  |
          */
55 | 0 |
         public String getLoggerName() {
56 | 0 |
             return loggerName;
57 |  |
         }
58 |  |
59 |  |
         /**
60 |  |
          * @param string
61 |  |
          */
62 | 0 |
         public void setLoggerName(String loggerName) {
63 | 0 |
             this.loggerName = loggerName;
64 | 0 |
             super.setLog(LogFactory.getLog(loggerName));
65 |  |
         }
66 |  |
67 |  |
         private static final char DEFAULT_SUB_LOG_NAME_DELIMITER = '.';
68 |  |
69 |  |
         private char subLogNameDelimiter = DEFAULT_SUB_LOG_NAME_DELIMITER;
70 |  |
71 |  |
         /**
72 |  |
          * @return
73 |  |
          */
74 | 0 |
         public char getSubLogNameDelimiter() {
75 | 0 |
             return subLogNameDelimiter;
76 |  |
         }
77 |  |
78 |  |
         /**
79 |  |
          * @param c
80 |  |
          */
81 | 0 |
         public void setSubLogNameDelimiter(char c) {
82 | 0 |
             subLogNameDelimiter = c;
83 |  |
         }
84 |  |
85 | 0 |
         public CascadeNamedLog subLog(String subName) {
86 | 0 |
             return new CascadeNamedLog(this.getLoggerName()
87 |  |
                     + getSubLogNameDelimiter() + subName, getDefaultLevel());
88 |  |
         }
89 |  |
90 | 0 |
         public CascadeNamedLog subLog(Object object) {
91 | 0 |
             return subLog(object.getClass());
92 |  |
         }
93 |  |
94 | 0 |
         public CascadeNamedLog subLog(Class class1) {
95 | 0 |
             return subLogByShortClassName(class1);
96 |  |
         }
97 |  |
98 | 0 |
         public CascadeNamedLog subLogByShortClassName(Class class1) {
99 | 0 |
             return subLog(ClassUtils.toShortClassName(class1));
100 |  |
         }
101 |  |
102 | 0 |
         public CascadeNamedLog subLogByFullClassName(Class class1) {
103 | 0 |
             return subLog(class1.getName());
104 |  |
         }
105 |  |
106 |  |
     }