add slf4j logging testcase

This commit is contained in:
wenshao
2013-06-15 12:37:11 +08:00
parent a4a31362bf
commit 2aabdaea4b
2 changed files with 24 additions and 7 deletions
@@ -23,7 +23,6 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import com.alibaba.druid.DruidRuntimeException;
import com.alibaba.druid.filter.FilterAdapter;
import com.alibaba.druid.filter.FilterChain;
import com.alibaba.druid.proxy.jdbc.CallableStatementProxy;
@@ -159,12 +158,6 @@ public class WallFilter extends FilterAdapter implements WallFilterMBean {
return inited;
}
public void checkInit() {
if (inited) {
throw new DruidRuntimeException("wall filter is inited");
}
}
@Override
public void statement_addBatch(FilterChain chain, StatementProxy statement, String sql) throws SQLException {
createWallContext(statement);
@@ -0,0 +1,24 @@
package com.alibaba.druid.bvt.support.logging;
import junit.framework.TestCase;
import com.alibaba.druid.pool.DruidDataSource;
import com.alibaba.druid.support.logging.SLF4JImpl;
public class SLF4JImplTest extends TestCase {
public void test_0() throws Exception {
SLF4JImpl impl = new SLF4JImpl(DruidDataSource.class.getName());
impl.isDebugEnabled();
impl.isInfoEnabled();
impl.isWarnEnabled();
impl.debug("");
impl.debug("", new Exception());
impl.info("");
impl.warn("");
impl.warn("", new Exception());
impl.error("");
impl.error("", new Exception());
}
}