本文整理汇总了Java中org.apache.openjpa.lib.log.Log类的典型用法代码示例。如果您正苦于以下问题:Java Log类的具体用法?Java Log怎么用?Java Log使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Log类属于org.apache.openjpa.lib.log包,在下文中一共展示了Log类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: immediateDropDB
import org.apache.openjpa.lib.log.Log; //导入依赖的package包/类
private void immediateDropDB(ConnectionProperties props) throws Exception {
if (context != null) {
destroyApplication();
context = null;
}
JDBCConfigurationImpl conf = new JDBCConfigurationImpl();
try {
conf.setPropertiesFile(OmFileHelper.getPersistence());
conf.setConnectionDriverName(props.getDriver());
conf.setConnectionURL(props.getURL());
conf.setConnectionUserName(props.getLogin());
conf.setConnectionPassword(props.getPassword());
//HACK to suppress all warnings
getLogImpl(conf).setLevel(Log.INFO);
runSchemaTool(conf, SchemaTool.ACTION_DROPDB);
runSchemaTool(conf, SchemaTool.ACTION_CREATEDB);
} finally {
conf.close();
}
}
示例2: beforeConfigurationLoad
import org.apache.openjpa.lib.log.Log; //导入依赖的package包/类
@Override
public boolean beforeConfigurationLoad(final Configuration conf) {
if (conf instanceof JDBCConfigurationImpl) {
final JDBCConfigurationImpl jdbcConfig = (JDBCConfigurationImpl) conf;
final PluginValue dbdictionaryPlugin = jdbcConfig.dbdictionaryPlugin;
final Log log = jdbcConfig.getLog(JDBCConfiguration.LOG_JDBC);
if (classPresent("com.ibm.ws.persistence.jdbc.sql.DB2Dictionary")) {
if (log.isInfoEnabled()) {
log.info(_loc.get("db2-ws-dictionary"));
}
dbdictionaryPlugin.setAlias("db2", RowNumberWSDB2Dictionary.class.getName());
return true;
}
if (classPresent("org.apache.openjpa.jdbc.sql.DB2Dictionary")) {
if (log.isInfoEnabled()) {
log.info(_loc.get("db2-openjpa-dictionary"));
}
dbdictionaryPlugin.setAlias("db2", RowNumberDB2Dictionary.class.getName());
return true;
}
}
return false;
}
示例3: newLogAdapter
import org.apache.openjpa.lib.log.Log; //导入依赖的package包/类
protected Log newLogAdapter(String channel) {
return new LogAdapter(LoggerFactory.getLogger(channel));
}
示例4: getLog
import org.apache.openjpa.lib.log.Log; //导入依赖的package包/类
@Override
public Log getLog(final String channel) {
return new OpenJPALog(channel);
}
示例5: newLogAdapter
import org.apache.openjpa.lib.log.Log; //导入依赖的package包/类
@Override
protected Log newLogAdapter(final String channel) {
return new JULOpenJPALog(new LoggerCreator(channel));
}
示例6: getLog
import org.apache.openjpa.lib.log.Log; //导入依赖的package包/类
@Override
public Log getLog(final String channel) {
CHANNELS.add(channel);
return new NoneLogFactory.NoneLog();
}