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


Java JPFLogger类代码示例

本文整理汇总了Java中gov.nasa.jpf.util.JPFLogger的典型用法代码示例。如果您正苦于以下问题:Java JPFLogger类的具体用法?Java JPFLogger怎么用?Java JPFLogger使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


JPFLogger类属于gov.nasa.jpf.util包,在下文中一共展示了JPFLogger类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: log

import gov.nasa.jpf.util.JPFLogger; //导入依赖的package包/类
private static void log (JPFLogger logger, int logLevel, String msg){
  switch (logLevel){
  case SEVERE:
    logger.severe( msg);
    break;
  case WARNING:
    logger.warning( msg);
    break;
  case INFO:
    logger.info( msg);
    break;
  case FINE:
    logger.fine( msg);
    break;
  case FINER:
    logger.finer( msg);
    break;
  case FINEST:
    logger.finest( msg);
    break;
  default:
    throw new JPFException("unknown log level " + logLevel + " for logger " + logger.getName());
  }    
}
 
开发者ID:grzesuav,项目名称:gjpf-core,代码行数:25,代码来源:JPF_gov_nasa_jpf_vm_Verify.java

示例2: log__Ljava_lang_String_2ILjava_lang_String_2_3Ljava_lang_Object_2__V

import gov.nasa.jpf.util.JPFLogger; //导入依赖的package包/类
@MJI
public static void log__Ljava_lang_String_2ILjava_lang_String_2_3Ljava_lang_Object_2__V (MJIEnv env, int clsObjRef,
    int loggerIdRef, int logLevel, int fmtRef, int argsRef){
  String loggerId = env.getStringObject(loggerIdRef);
  String fmt = env.getStringObject(fmtRef);
  JPFLogger logger = JPF.getLogger(loggerId);

  int[] argRefs = env.getReferenceArrayObject( argsRef);
  Object[] args = new Object[argRefs.length];
  for (int i=0; i<args.length; i++){
    ElementInfo eiArg = env.getElementInfo(argRefs[i]);
    if (eiArg.isStringObject()){
      args[i] = env.getStringObject(argRefs[i]);
    } else if (eiArg.isBoxObject()){
      args[i] = eiArg.asBoxObject(); 
    } else {
      args[i] = eiArg.toString();
    }
  }
  
  String msg = String.format(fmt, args);
  
  log( logger, logLevel, msg);
}
 
开发者ID:grzesuav,项目名称:gjpf-core,代码行数:25,代码来源:JPF_gov_nasa_jpf_vm_Verify.java

示例3: writeResultToFile

import gov.nasa.jpf.util.JPFLogger; //导入依赖的package包/类
private static void writeResultToFile(String content, String filename) {
  try (PrintWriter writer = new PrintWriter(filename)) {
    writer.print(content);
  } catch (IOException e) {
    JPFLogger.getLogger("psyco").severe(e.getStackTrace().toString());
  }
}
 
开发者ID:psycopaths,项目名称:psyco,代码行数:8,代码来源:PsycoProfiler.java

示例4: log__Ljava_lang_String_2ILjava_lang_String_2__V

import gov.nasa.jpf.util.JPFLogger; //导入依赖的package包/类
@MJI
public static void log__Ljava_lang_String_2ILjava_lang_String_2__V (MJIEnv env, int clsObjRef,
    int loggerIdRef, int logLevel, int msgRef){
  String loggerId = env.getStringObject(loggerIdRef);
  String msg = env.getStringObject(msgRef);
  JPFLogger logger = JPF.getLogger(loggerId);
  
  log( logger, logLevel, msg);
}
 
开发者ID:grzesuav,项目名称:gjpf-core,代码行数:10,代码来源:JPF_gov_nasa_jpf_vm_Verify.java

示例5: log__Ljava_lang_String_2ILjava_lang_String_2Ljava_lang_String_2__V

import gov.nasa.jpf.util.JPFLogger; //导入依赖的package包/类
@MJI
public static void log__Ljava_lang_String_2ILjava_lang_String_2Ljava_lang_String_2__V (MJIEnv env, int clsObjRef,
    int loggerIdRef, int logLevel, int arg1Ref, int arg2Ref){
  String loggerId = env.getStringObject(loggerIdRef);
  String msg = env.getStringObject(arg1Ref) + env.getStringObject(arg2Ref);
  JPFLogger logger = JPF.getLogger(loggerId);
  
  log( logger, logLevel, msg);
}
 
开发者ID:grzesuav,项目名称:gjpf-core,代码行数:10,代码来源:JPF_gov_nasa_jpf_vm_Verify.java

示例6: SearchEngine

import gov.nasa.jpf.util.JPFLogger; //导入依赖的package包/类
public SearchEngine(PsycoConfig pconf) {
  this.pconf = pconf;
  logger = JPFLogger.getLogger(HelperMethods.getLoggerName());
  updateFolderName(pconf);
}
 
开发者ID:psycopaths,项目名称:psyco,代码行数:6,代码来源:SearchEngine.java

示例7: getLogger

import gov.nasa.jpf.util.JPFLogger; //导入依赖的package包/类
/**
 * use this one to get a Logger that is initialized via our Config mechanism. Note that
 * our own Loggers do NOT pass
 */
public static JPFLogger getLogger (String name) {
  return LogManager.getLogger( name);
}
 
开发者ID:grzesuav,项目名称:gjpf-core,代码行数:8,代码来源:JPF.java


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