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

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

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

Log.t介绍

[英]Log a message in trace, it will automatically append the objects if trace is enabled. Can Also add a trace. This is the local trace method. The trace will only written if the local trace is switched on.
[中]在跟踪中记录消息,如果启用跟踪,它将自动附加对象。还可以添加跟踪。这是本地跟踪方法。仅当本地跟踪打开时,才会写入跟踪。

代码示例

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

@Override
public void log(String msg) {
  if (log != null)
    log.t(msg);
}

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

/** {@inheritDoc} */
@Override
public void close() {
  if (entityManager == null) return;
  log().t("close");
  entityManager.close();
  entityManager = null;
}

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

/** {@inheritDoc} */
@Override
public <T> T find(Class<T> entityClass, Object primaryKey,
    LockModeType lockMode, Map<String, Object> properties) {
  log().t("find",entityClass,primaryKey,lockMode,properties);
  return entityManager
      .find(entityClass, primaryKey, lockMode, properties);
}

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

/** {@inheritDoc} */
@Override
@SuppressWarnings("rawtypes")
public Query createNativeQuery(String sqlString, Class resultClass) {
  log().t("create native query",sqlString,resultClass);
  return entityManager.createNativeQuery(sqlString, resultClass);
}

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

/** {@inheritDoc} */
@Override
public Query createNativeQuery(String sqlString, String resultSetMapping) {
  log().t("create native query",sqlString,resultSetMapping);
  return entityManager.createNativeQuery(sqlString, resultSetMapping);
}

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

/**
 * <p>begin.</p>
 */
public void begin() {
  log().t("begin");
  getTransaction().begin();
}

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

public void check() {
  try {
    getObject();
  } catch (Throwable t) {
    log().t(name,"closed");
  }
}

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

@Override
public int read() {
  try {
    return reader.readCharacter(true);
  } catch (IOException e) {
    MLogUtil.log().t(e);
  }
  return -1;
}

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

@Override
public void finalize() {
  log().t("finalize");
  if (timer != null) timer.cancel();
  timer = null;
}

代码示例来源: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

/** {@inheritDoc} */
@Override
public void setFlushMode(FlushModeType flushMode) {
  log().t("flush mode",flushMode);
  entityManager.setFlushMode(flushMode);
}

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

/** {@inheritDoc} */
@Override
public void joinTransaction() {
  log().t("join transaction");
  entityManager.joinTransaction();
}

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

/** {@inheritDoc} */
@Override
public EntityManager createEntityManager(@SuppressWarnings("rawtypes") Map map) {
  log().t("create entity manager",map);
  return new JpaEntityManager(this, entityManagerFactory, map);
}

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

public static String compileAndExecute(String template, IProperties attributes, String def) {
  try {
    return StringCompiler.compile(template).execute(attributes);
  } catch (MException e) {
    MLogUtil.log().t("MString.compileAndExecute",template,e);
  }
  return def;
}

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

@Override
public Object getObject(UiComponent component, String name, Object def) {
  try {
    log().t("getObject1",component,name,def);
    Object ret = model.getAttribute(getName(component,name)).get(pojo.getPojo());
    if (ret == null) return def;
    return ret;
  } catch (Throwable e) {
    log().t(e);
  }
  return def;
}

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

/** {@inheritDoc} */
@Override
public <T> T getReference(Class<T> entityClass, Object primaryKey) {
  log().t("getReference",entityClass,primaryKey);
  return injectObject(entityManager.getReference(entityClass, primaryKey));
}

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

/**
 * <p>initJpa.</p>
 */
protected void initJpa() {
  log().t("init");
  unitId = UUID.randomUUID();
  schema.doInit(properties.getConfig());
  properties.configureTypes();
  entityManagerFactory = Persistence.createEntityManagerFactory(schema.getSchemaName() + "-" + unitId.toString(), properties);
  schema.doPostInit(this);
}

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

/** {@inheritDoc} */
@Override
public Object getValue(Object obj, Field field, Object val) throws MException {
  if ( ( cutAll || field.getAttributes().getBoolean("cut",false) ) && val != null && val instanceof String && ((String)val).length() > field.getSize()) {
    log().t("cut",field);
    val = ((String)val).substring(0,field.getSize());
  }
  return val;
}

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

protected void doTimerTask(String cmd) {
  JmsChannel c = getChannel();
  if (c == null || c.isClosed()) return;
  try {
    ((Heartbeat)c).sendHeartbeat(cmd);
  } catch (Throwable t) {
    log().t(t);
  }
}
public void setName(String name) {

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

protected void jmxRegister(boolean weak,String name) {
    if (!isJmxRegistered()) {
      try {
        setJmxName(name);
        MApi.lookup(MRemoteManager.class).register(this,weak);
      } catch (Throwable e) {
        log().t(e);
      }
    }
  }
}

相关文章