本文整理汇总了Java中com.j256.ormlite.logger.LoggerFactory类的典型用法代码示例。如果您正苦于以下问题:Java LoggerFactory类的具体用法?Java LoggerFactory怎么用?Java LoggerFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LoggerFactory类属于com.j256.ormlite.logger包,在下文中一共展示了LoggerFactory类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: AndroidLog
import com.j256.ormlite.logger.LoggerFactory; //导入依赖的package包/类
public AndroidLog(String paramString)
{
this.className = LoggerFactory.getSimpleClassName(paramString);
int i = this.className.length();
if (i > 23)
this.className = this.className.substring(i - 23, i);
int j = 0;
Log.Level[] arrayOfLevel = Log.Level.values();
int k = arrayOfLevel.length;
for (int m = 0; m < k; m++)
{
int n = levelToAndroidLevel(arrayOfLevel[m]);
if (n > j)
j = n;
}
this.levelCache = new boolean[j + 1];
refreshLevelCache();
}
示例2: AndroidLog
import com.j256.ormlite.logger.LoggerFactory; //导入依赖的package包/类
public AndroidLog(String className) {
// get the last part of the class name
this.className = LoggerFactory.getSimpleClassName(className);
// make sure that our tag length is not too long
int length = this.className.length();
if (length > MAX_TAG_LENGTH) {
this.className = this.className.substring(length - MAX_TAG_LENGTH, length);
}
// find the maximum level value
int maxLevel = 0;
for (com.j256.ormlite.logger.Log.Level level : com.j256.ormlite.logger.Log.Level.values()) {
int androidLevel = levelToAndroidLevel(level);
if (androidLevel > maxLevel) {
maxLevel = androidLevel;
}
}
levelCache = new boolean[maxLevel + 1];
refreshLevelCache();
}
示例3: initializeDb
import com.j256.ormlite.logger.LoggerFactory; //导入依赖的package包/类
public static void initializeDb() throws SQLException {
//TODO combine logging
System.setProperty(LoggerFactory.LOG_TYPE_SYSTEM_PROPERTY,
LoggerFactory.LogType.LOCAL.toString());
System.setProperty(LocalLog.LOCAL_LOG_LEVEL_PROPERTY,
Log.Level.INFO.toString());
INSTANCE = new VaultDao();
INSTANCE.initDb();
}
示例4: initializeDb
import com.j256.ormlite.logger.LoggerFactory; //导入依赖的package包/类
/**
* Initializes the connection to the database and sets up the Vault Database Access Object {@link #INSTANCE}.
*
* @throws SQLException Thrown if the database can not be successfully initialized.
*/
public static void initializeDb() throws SQLException {
//TODO combine logging
System.setProperty(LoggerFactory.LOG_TYPE_SYSTEM_PROPERTY,
LoggerFactory.LogType.LOCAL.toString());
System.setProperty(LocalLog.LOCAL_LOG_LEVEL_PROPERTY,
Log.Level.INFO.toString());
INSTANCE = new VaultDao();
INSTANCE.initDb();
}
示例5: getLogger
import com.j256.ormlite.logger.LoggerFactory; //导入依赖的package包/类
/**
* Get the logger for the class. We do this so we don't have to create it all of the time.
*/
private static Logger getLogger() {
if (logger == null) {
logger = LoggerFactory.getLogger(VersionUtils.class);
}
return logger;
}
示例6: getLogger
import com.j256.ormlite.logger.LoggerFactory; //导入依赖的package包/类
private static Logger getLogger()
{
if (logger == null)
logger = LoggerFactory.getLogger(VersionUtils.class);
return logger;
}