|
|||||||||||||||||||
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 | |||||||||||||||
ConsoleLoggerStore.java | - | 100% | 100% | 100% |
|
1 |
/*
|
|
2 |
* Copyright (C) The Spice Group. All rights reserved.
|
|
3 |
*
|
|
4 |
* This software is published under the terms of the Spice
|
|
5 |
* Software License version 1.1, a copy of which has been included
|
|
6 |
* with this distribution in the LICENSE.txt file.
|
|
7 |
*/
|
|
8 |
package org.codehaus.spice.loggerstore.stores;
|
|
9 |
|
|
10 |
import org.jcontainer.dna.Logger;
|
|
11 |
import org.jcontainer.dna.impl.ConsoleLogger;
|
|
12 |
|
|
13 |
/**
|
|
14 |
* ConsoleLoggerStore extends AbstractLoggerStore to provide the implementation
|
|
15 |
* specific that just writes to console.
|
|
16 |
*
|
|
17 |
* @author <a href="mailto:mauro.talevi at aquilonia.org">Mauro Talevi</a>
|
|
18 |
*/
|
|
19 |
public class ConsoleLoggerStore |
|
20 |
extends AbstractLoggerStore
|
|
21 |
{ |
|
22 |
/**
|
|
23 |
* Creates a <code>ConsoleLoggerStore</code> using the specified Logger
|
|
24 |
* level.
|
|
25 |
*
|
|
26 |
* @param level the debug level of ConsoleLoggerStore
|
|
27 |
* @throws Exception if fails to create or configure Logger
|
|
28 |
*/
|
|
29 | 3 |
public ConsoleLoggerStore( final int level ) |
30 |
throws Exception
|
|
31 |
{ |
|
32 | 3 |
setRootLogger( new ConsoleLogger( level ) );
|
33 |
} |
|
34 |
|
|
35 |
/**
|
|
36 |
* Creates new ConsoleLogger for the given category.
|
|
37 |
*/
|
|
38 | 3 |
protected Logger createLogger( final String name )
|
39 |
{ |
|
40 | 3 |
return getRootLogger().getChildLogger( name );
|
41 |
} |
|
42 |
|
|
43 |
/**
|
|
44 |
* Closes the LoggerStore and shuts down the logger hierarchy.
|
|
45 |
*/
|
|
46 | 3 |
public void close() |
47 |
{ |
|
48 |
} |
|
49 |
} |
|
50 |
|
|