本文整理汇总了Java中org.apache.commons.logging.impl.SimpleLog类的典型用法代码示例。如果您正苦于以下问题:Java SimpleLog类的具体用法?Java SimpleLog怎么用?Java SimpleLog使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SimpleLog类属于org.apache.commons.logging.impl包,在下文中一共展示了SimpleLog类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: execute
import org.apache.commons.logging.impl.SimpleLog; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
public void execute() throws BuildException {
int logLevel = SimpleLog.LOG_LEVEL_INFO;
switch (getMessageType()) {
case Project.MSG_DEBUG : logLevel = SimpleLog.LOG_LEVEL_DEBUG; break;
case Project.MSG_INFO : logLevel = SimpleLog.LOG_LEVEL_INFO; break;
case Project.MSG_WARN : logLevel = SimpleLog.LOG_LEVEL_WARN; break;
case Project.MSG_ERR : logLevel = SimpleLog.LOG_LEVEL_ERROR; break;
case Project.MSG_VERBOSE: logLevel = SimpleLog.LOG_LEVEL_DEBUG; break;
default: logLevel = SimpleLog.LOG_LEVEL_INFO;
}
SimpleLog logger = new SimpleLog("FOP/Anttask");
logger.setLevel(logLevel);
try {
FOPTaskStarter starter = new FOPTaskStarter(this);
starter.setLogger(logger);
starter.run();
} catch (FOPException ex) {
throw new BuildException(ex);
} catch (IOException ioe) {
throw new BuildException(ioe);
} catch (SAXException saxex) {
throw new BuildException(saxex);
}
}
开发者ID:pellcorp,项目名称:fop,代码行数:29,代码来源:Fop.java
示例2: getLogger
import org.apache.commons.logging.impl.SimpleLog; //导入依赖的package包/类
/**
* Returns the logger associated with this transcoder. It returns a
* SimpleLog if no logger has been explicitly set.
* @return Logger the logger for the transcoder.
*/
protected final Log getLogger() {
if (this.logger == null) {
this.logger = new SimpleLog("FOP/Transcoder");
((SimpleLog) logger).setLevel(SimpleLog.LOG_LEVEL_INFO);
}
return this.logger;
}
开发者ID:pellcorp,项目名称:fop,代码行数:13,代码来源:AbstractFOPTranscoder.java
示例3: setDebug
import org.apache.commons.logging.impl.SimpleLog; //导入依赖的package包/类
/**
* Controls whether to set logging to debug level
* @param debug If true, debug level, if false, error level
*/
public void setDebug(boolean debug) {
if (debug) {
logger.setLevel(SimpleLog.LOG_LEVEL_DEBUG);
} else {
logger.setLevel(SimpleLog.LOG_LEVEL_ERROR);
}
}
开发者ID:pellcorp,项目名称:fop,代码行数:12,代码来源:TestConverter.java
示例4: setUp
import org.apache.commons.logging.impl.SimpleLog; //导入依赖的package包/类
protected void setUp() throws Exception {
super.setUp();
originalLogFactoryAttribute = (String) LogFactory.getFactory().getAttribute(LogFactoryImpl.LOG_PROPERTY);
LogFactory.getFactory().setAttribute(LogFactoryImpl.LOG_PROPERTY, SimpleLog.class.getName());
}
开发者ID:codehaus,项目名称:perf4j,代码行数:7,代码来源:CommonsLogStopWatchTest.java
示例5: TestConverter
import org.apache.commons.logging.impl.SimpleLog; //导入依赖的package包/类
/**
* Construct a new TestConverter
*/
public TestConverter() {
logger = new SimpleLog("FOP/Test");
logger.setLevel(SimpleLog.LOG_LEVEL_ERROR);
}
开发者ID:pellcorp,项目名称:fop,代码行数:8,代码来源:TestConverter.java
注:本文中的org.apache.commons.logging.impl.SimpleLog类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论