本文整理汇总了Java中com.j256.ormlite.logger.LocalLog类的典型用法代码示例。如果您正苦于以下问题:Java LocalLog类的具体用法?Java LocalLog怎么用?Java LocalLog使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LocalLog类属于com.j256.ormlite.logger包,在下文中一共展示了LocalLog类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: main
import com.j256.ormlite.logger.LocalLog; //导入依赖的package包/类
/**
* Main method, initialize the current node and determines if it is a head or a branch node
* @param args command line arguments
* @throws Exception if any exception occurs
*/
public static void main (String args[]) throws Exception {
//Reduce SQLite ORM verbosity
System.setProperty(LocalLog.LOCAL_LOG_LEVEL_PROPERTY, "ERROR");
//Adding bouncy castle as encryption provider
Security.addProvider(new BouncyCastleProvider());
//NodeConfiguration is a global static element holding all the node properties, it can be changed for testing reasons by updating the value of NodeConfiguration.Current
NodeConfiguration.Current.mpiNodeManager = new MpiNodeManager(args);
switch (NodeConfiguration.Current.mpiNodeManager.getNodeType()) {
case HEAD_OFFICE: { //Head office
System.out.println(">>> Head office started on " + MPI.getProcessorName());
NodeConfiguration.Current.systemAvailable = true;
handleSocketServerNode();
break;
}
default: { // Branch office
NodeConfiguration.Current.systemAvailable = true;
System.out.println(">>> Branch " + NodeConfiguration.Current.nodeBranch.getName() + " started on " + MPI.getProcessorName());
handleBranchNode();
}
}
}
示例2: initializeDb
import com.j256.ormlite.logger.LocalLog; //导入依赖的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();
}
示例3: initializeDb
import com.j256.ormlite.logger.LocalLog; //导入依赖的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();
}
示例4: DatabaseHelper
import com.j256.ormlite.logger.LocalLog; //导入依赖的package包/类
private DatabaseHelper(Context context) {
super(context, DATABASE_NAME, null, DATABASE_VERSION);
System.setProperty(LocalLog.LOCAL_LOG_LEVEL_PROPERTY, "FATAL");
}