%line | %branch | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
com.ozacc.mail.impl.VelocityLogSystem |
|
|
1 | package com.ozacc.mail.impl; |
|
2 | ||
3 | import org.apache.commons.logging.Log; |
|
4 | import org.apache.commons.logging.LogFactory; |
|
5 | import org.apache.velocity.app.Velocity; |
|
6 | import org.apache.velocity.runtime.RuntimeServices; |
|
7 | import org.apache.velocity.runtime.log.LogSystem; |
|
8 | ||
9 | /** |
|
10 | * Velocity¤Î¥úÁ°¥á¥Ã¥»¡¼¥¸¤òCommonsLogging¤òÄ̤·¤Æ½ÐÎϤµ¤»¤?¥¯¥é¥¹¡£ |
|
11 | * |
|
12 | * |
|
13 | * @see XMLVelocityMailBuilderImpl |
|
14 | * @see JDomXMLMailBuilder |
|
15 | * |
|
16 | * @since 1.0.3 |
|
17 | * |
|
18 | * @author Tomohiro Otsuka |
|
19 | * @version $Id: VelocityLogSystem.java,v 1.2.2.1 2004/11/25 08:01:07 otsuka Exp $ |
|
20 | */ |
|
21 | 14 | public class VelocityLogSystem implements LogSystem { |
22 | ||
23 | 2 | private static Log log = LogFactory.getLog(Velocity.class); |
24 | ||
25 | /** |
|
26 | * @see org.apache.velocity.runtime.log.LogSystem#init(org.apache.velocity.runtime.RuntimeServices) |
|
27 | */ |
|
28 | public void init(RuntimeServices rsvc) throws Exception { |
|
29 | // do nothing |
|
30 | 2 | } |
31 | ||
32 | /** |
|
33 | * @see org.apache.velocity.runtime.log.LogSystem#logVelocityMessage(int, java.lang.String) |
|
34 | */ |
|
35 | public void logVelocityMessage(int level, String message) { |
|
36 | 58 | switch (level) { |
37 | case DEBUG_ID: |
|
38 | 0 | log.debug(message); |
39 | 0 | break; |
40 | case INFO_ID: |
|
41 | 56 | log.info(message); |
42 | 56 | break; |
43 | case WARN_ID: |
|
44 | 0 | log.warn(message); |
45 | 0 | break; |
46 | case ERROR_ID: |
|
47 | 2 | log.error(message); |
48 | break; |
|
49 | } |
|
50 | 58 | } |
51 | ||
52 | } |
This report is generated by jcoverage, Maven and Maven JCoverage Plugin. |