de.mhus.lib.core.logging.Log.i()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(136)

本文整理了Java中de.mhus.lib.core.logging.Log.i()方法的一些代码示例,展示了Log.i()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Log.i()方法的具体详情如下:
包路径:de.mhus.lib.core.logging.Log
类名称:Log
方法名:i

Log.i介绍

[英]Log a message in info, it will automatically append the objects if debug is enabled. Can Also add a trace.
[中]在信息中记录一条消息,如果启用调试,它将自动附加对象。还可以添加跟踪。

代码示例

代码示例来源:origin: de.mhus.lib/mhu-lib-core

/**
 * Sleeps _millisec milliseconds. On Error (e.g. a break), it prints a
 * stacktrace dump.
 * @param _millisec 
 */
public static void sleep(long _millisec) {
  try {
    Thread.sleep(_millisec);
  } catch (InterruptedException e) {
    log.i(e);
  }
}

代码示例来源:origin: de.mhus.lib/mhu-lib-core

@Override
public void print(Object... out) {
  synchronized (lineBuffer) {
    for (Object o : out) {
      if (o instanceof Throwable)
        log.i(o);
      else
        lineBuffer.append(o);
    }
  }
}

代码示例来源:origin: de.mhus.lib/mhu-lib-core

@Override
public void println() {
  synchronized (lineBuffer) {
    log().i("STDOUT", lineBuffer);
    lineBuffer = new StringBuilder();
  }
}

代码示例来源:origin: de.mhus.lib/mhu-lib-persistence

@Override
public void disconnect() {
  log().i("disconnect");
  synchronized (this) {
    if (nameMapping == null) return;
    cIndex.clear();
    
    nameMapping = null;
    nameMappingRO = null;
    caoBundle = null;
    schemaPersistence = null;
  }
}

代码示例来源:origin: de.mhus.lib/mhu-lib-core

public MNls load(InputStream is) {
  Properties properties = new Properties();
  try {
    properties.load(is);
  } catch (IOException e) {
    log().i(e);
  }
  return new MNls(properties,"");
}

代码示例来源:origin: de.mhus.lib/mhu-lib-persistence

protected void createIndex(Statement sth, boolean unique, boolean btree,
    String iName, String table, String columns) {
  String sql = "CREATE " + (unique ? "UNIQUE" : "" ) + 
         " INDEX " + iName + (btree ? " USING BTREE" : "") +
         " ON "+table+ "("+columns+")";
  log().t(sql);
  try {
    sth.execute(sql.toString());
  } catch (Exception e) {
    log().i(sql,e);
  }
}

代码示例来源:origin: de.mhus.lib/mhu-lib-persistence

@Override
public void connect() throws MException {
  log().i("connect");
  synchronized (this) {
    initDatabase(false);
  }
}

代码示例来源:origin: de.mhus.lib/mhu-lib-core

public void unregister(ObjectName name) {
  synchronized (this) {
    registry.remove(name);
    if (mbs != null)
      try {
        log().t("unregister",name);
        mbs.unregisterMBean(name);
      } catch (Exception e) {
        log().i(name,e);
      }
  }
  
}

代码示例来源:origin: de.mhus.lib/mhu-lib-persistence

protected void alterTableChangePrimaryKey(Statement sth, String tn,
    String keys) {
  String sql = "ALTER TABLE "+tn+" DROP PRIMARY KEY, ADD PRIMARY KEY("+keys+")";
  log().d("new primary key",sql);
  try {
    sth.execute(sql.toString());
  } catch (Exception e) {
    log().i(sql,e);
  }
}

代码示例来源:origin: de.mhus.lib/mhu-lib-karaf

@Reference(service=MVault.class)
public void setVault(MVault vault) {
  log().i("Reference Vault");
  this.vault = vault;
}

代码示例来源:origin: de.mhus.lib/mhu-lib-persistence

protected void alterTableDropPrimaryKey(Statement sth, String tn) {
  String sql = "ALTER TABLE "+tn+" DROP PRIMARY KEY";
  log().d("drop primary key",sql);
  try {
    sth.execute(sql.toString());
  } catch (Exception e) {
    log().i(sql,e);
  }
}

代码示例来源:origin: de.mhus.lib/mhu-lib-persistence

@Override
public void doAnalyze(long connectionId, String original, String query, long delta, Throwable t) {
  log().i(connectionId,MPeriod.getIntervalAsString(delta),original,query);
}

代码示例来源:origin: de.mhus.lib/mhu-lib-karaf

@Activate
public void doActivate(ComponentContext ctx) {
  
  log().i("activate");
  instance = this;
  context = ctx.getBundleContext();
  connectionTracker = new ServiceTracker<>(context, JmsDataSource.class, new MyConnectionTrackerCustomizer() );
  connectionTracker.open();
  channelTracker = new ServiceTracker<>(context, JmsDataChannel.class, new MyChannelTrackerCustomizer() );
  channelTracker.open();
  
}

代码示例来源:origin: de.mhus.lib/mhu-lib-persistence

protected void alterColumnAdd(Statement sth, String tn, IConfig cfield) {
  //		String sql = "ALTER TABLE " + tn + " ADD COLUMN (" + getFieldConfig(cfield) + ")";
  String sql = "ALTER TABLE " + tn + " ADD COLUMN " + getFieldConfig(cfield);
  log().d("alter table",sql);
  try {
    sth.execute(sql);
  } catch (Exception e) {
    log().i(sql,e);
  }
}

代码示例来源:origin: de.mhus.lib/mhu-lib-persistence

protected void alterColumn(Statement sth,String tn, IConfig cfield) {
  String sql = "ALTER TABLE " + tn + " MODIFY COLUMN " + getFieldConfig(cfield);
  log().d("alter table",sql);
  try {
    sth.execute(sql);
  } catch (Exception e) {
    log().i(sql,e);
  }
}

代码示例来源:origin: de.mhus.lib/mhu-lib-karaf

protected void removeSchedulerService(SchedulerService service) {
  SchedulerJob job = services.get(service);
  if (job != null) {
    job.setNextExecutionTime(SchedulerJob.REMOVE_TIME);
    myTimer.getQueue().removeJob(job);
  } else {
    log().i("timer task not found for ScheduledService", service);
  }
}

代码示例来源:origin: de.mhus.lib/mhu-lib-karaf

@Deactivate
void doDeactivate(ComponentContext ctx) {
  
  log().i("cancel common timer");
  tracker.stop();
  myTimer.cancel();
  myTimer = null;
  instance = null;
}

代码示例来源:origin: de.mhus.cherry.reactive/reactive-model

public void save() {
  if (context != null) {
    try {
      context.saveRuntime();
    } catch (IOException e) {
      log().e(e);
    }
  } else {
    log().i("Context not set in runtime");
  }
}

代码示例来源:origin: de.mhus.lib/mhu-lib-core

@Override
  public void doit() {
    log().t(getClass(),"Housekeeper");
    poolClean(CFG_PENDING_TIME.value());
    try {
      MThreadPoolDaemon.poolClean(CFG_PENDING_TIME.value());
    } catch (NoClassDefFoundError e) {
      // this only happens in OSGi if the bundle was uninstalled
      log().i("Close stale ThreadHousekeeper", e.toString() );
      cancel();
    }
  }
}

代码示例来源:origin: de.mhus.lib/mhu-lib-vaadin6

public void addComposite(LayoutComposite composite,Component layout) {
  
  if (currentComponent == null) return;
  
  int row = 0;
  
  if (composite.getOffset() > 0 && currentComponent.getGrid() != null) {
    row = currentComponent.getGrid().getRows()-1;
  } else {
    row = currentComponent.createRow();
  }
  log().i("add comp",composite.getOffset(),row,composite.getOffset()+composite.getColumns()-1,row);
  currentComponent.addComponent(composite,layout,composite.getOffset(),row,composite.getOffset()+composite.getColumns()-1,row);
  
}

相关文章