当前位置: 首页>>代码示例>>Java>>正文


Java LocalLog类代码示例

本文整理汇总了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();
        }
    }
}
 
开发者ID:AlexisChevalier,项目名称:CarRental-Distributed-System,代码行数:30,代码来源:Main.java

示例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();
}
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:11,代码来源:VaultDao.java

示例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();
}
 
开发者ID:lucasbuschlinger,项目名称:BachelorPraktikum,代码行数:16,代码来源:VaultDao.java

示例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");
}
 
开发者ID:lujianzhao,项目名称:AndroidBase,代码行数:5,代码来源:DatabaseHelper.java


注:本文中的com.j256.ormlite.logger.LocalLog类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。