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

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

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

Log.e介绍

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

代码示例

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

protected void taskError(Throwable t) {
  log().e(name,t);
}

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

public static void trace(long connectionId, String original, String query, long start, Throwable t) {
  try {
    long delta = System.currentTimeMillis() - start;
    if (analyzer != null)
      analyzer.doAnalyze(connectionId,original,query,delta, t);
  } catch (Throwable t2) {
    log.e(t2);
  }
}

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

@Override
public void doUpdateValues() {
  for (Map.Entry<String, UiVaadin> entry : index.entrySet())
    try {
      entry.getValue().doUpdateValue();
    } catch (Throwable e) {
      log().e(entry.getKey(),e);
    }
}

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

protected MActivator doCreateActivator() {
  try {
    return new DefaultActivator(null, getClass().getClassLoader());
  } catch (MException e) {
    log().e(e);
  }
  return null;
}

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

@Override
public void doRevert() {
  try {
    layout.doRevert();
  } catch (Throwable e) {
    log().e(e);
  }
  for (Map.Entry<String, UiVaadin> entry : index.entrySet())
    try {
      entry.getValue().doRevert();
    } catch (Throwable e) {
      log().e(entry.getKey(),e);
    }
}

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

/** {@inheritDoc} */
@Override
protected void send(String msg) {
  try {
    byte[] sendData = msg.getBytes(MString.CHARSET_UTF_8);
    send(sendData, 0, sendData.length);
  } catch (IOException e) {
    log().e(name,e);
  }
}

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

@Override
public void removeService(DbManagerService service) {
  if (service == null) return;
  synchronized (services) {
    services.remove(service);
  }
  try {
    service.doClose();
  } catch (Throwable t) {
    log().e(t);
  }
}

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

public void doUpdateValue(String name) {
  UiVaadin entry = index.get(name);
  try {
    entry.doUpdateValue();
  } catch (Throwable e) {
    log().e(name,e);
  }
}

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

@Override
public JmsDataChannel addingService(
    ServiceReference<JmsDataChannel> reference) {
  try {
    JmsDataChannel service = context.getService(reference);
    if (service != null)
      addChannel(service);
    return service;
  } catch (Throwable t) {
    log().e(reference,t);
    return null;
  }
}

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

protected void updateStorageDataSource() throws InvalidSyntaxException, MException {
  Collection<ServiceReference<DataSource>> refs = context.getServiceReferences(DataSource.class, "(osgi.jndi.service.name="+storageDsName+")");
  if (refs.size() == 0) throw new MException("datasource not found",storageDsName);
  storageDataSource = context.getService(refs.iterator().next());
  storageDsProvider.setDataSource(storageDataSource);
  try {
    String driver = storageDataSource.getConnection().getMetaData().getDriverName();
    Dialect dialect = Dialect.findDialect(driver);
    storageDsProvider.setDialect(dialect);
  } catch (Exception e) {
    log().e(e);
  }
}

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

@Override
  public void run() {
    try {
      doTick();
    } catch (Throwable t) {
      log().e(t);
    }
  }
}, 1000, 1000);

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

@Override
  public synchronized SecureRandom getSecureRandom() {
    try {
//            secureRandom = SecureRandom.getInstance("SHA1PRNG", "SUN");
      if (secureRandom == null)
        secureRandom = new MySecureRandom();
    } catch (Exception e) {
      MLogUtil.log().e(e);
    }
    return secureRandom;
  }

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

public static void setAnalyzer(SqlAnalyzer analyzer_) {
  try {
    if (analyzer != null) analyzer.stop();
    analyzer = analyzer_;
    if (analyzer != null) analyzer.start();
  } catch (Throwable t) {
    log.e(t);
    analyzer = null;
  }
}

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

protected synchronized void doWritable() {
  if (isChanged()) return;
  try {
    current = node.getWritableNode();
  } catch (MException e) {
    log().e("Can't edit node", e);
  }
}

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

public synchronized void close() {
  if (isClosed() || isShared()) return;
  try {
    closeConnection();
  } catch (Throwable t) {
    log().e(getName(),"on close", t);
  }
  closed = true;
}

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

public void init() {
  try {
    URL url = MSystem.locateResource(this, "SqlDbStorage.xml");
    DbConnection con = pool.getConnection();
    XmlConfigFile data = new XmlConfigFile(url.openStream());
    data.setString("prefix", prefix);
    pool.getDialect().createStructure(data, con, null, false);
    con.close();
  } catch (Exception e) {
    log().e(e);
  }
}

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

private void removeIds(File file) {
  File meta = ((FdbCore)core).getMetaFileFor(file);
  MProperties p = MProperties.load(meta);
  if (p == null) p = new MProperties();
  p.remove("_id");
  try {
    p.save(meta);
  } catch (IOException e) {
    log().e(file,e);
  }
}

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

protected void error(Object ... msg) {
  log().e(msg);
  try {
    getContext().getARuntime().doErrorMsg(getContext().getPNode(), msg);
  } catch (Throwable t) {}
}

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

@Override
public boolean uploadRendition(String name, File file) {
  try {
    CaoAction action = node.getConnection().getAction(CaoAction.UPLOAD_RENDITION);
    if (action == null) return false;
    UploadRenditionConfiguration configuration = (UploadRenditionConfiguration) action.createConfiguration(node, null);
    configuration.setRendition(name);
    configuration.setFile(file);
    OperationResult ret = action.doExecute(configuration, null);
    return ret != null && ret.isSuccessful();
  } catch (Exception e) {
    log().e("uploadRendition",node,name,e);
  }
  return false;
}

相关文章