本文整理了Java中org.apache.openejb.util.Logger.getInstance()
方法的一些代码示例,展示了Logger.getInstance()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.getInstance()
方法的具体详情如下:
包路径:org.apache.openejb.util.Logger
类名称:Logger
方法名:getInstance
[英]Finds a Logger from the cache and returns it. If not found in cache then builds a Logger and returns it.
[中]从缓存中查找记录器并返回它。如果在缓存中找不到,则构建一个记录器并返回它。
代码示例来源:origin: org.apache.openejb/openejb-core
private static Logger logger() { // don't trigger init too eagerly to be sure to be configured
if (logger == null) {
logger = Logger.getInstance(LogCategory.OPENEJB_STARTUP, OpenEjbContainer.class);
}
return logger;
}
代码示例来源:origin: org.apache.tomee/openejb-core
private static Logger logger() { // don't trigger init too eagerly to be sure to be configured
if (logger == null) {
logger = Logger.getInstance(LogCategory.OPENEJB_STARTUP, OpenEjbContainer.class);
}
return logger;
}
代码示例来源:origin: org.apache.openejb/openejb-hsql
public HsqlPrintWriter(final boolean errorWriter) {
super(System.err);
logger = Logger.getInstance(LogCategory.OPENEJB_HSQL, HsqlPrintWriter.class);
this.errorWriter = errorWriter;
}
代码示例来源:origin: org.apache.openejb/openejb-core
private static Logger logger() { // don't trigger init too eagerly to be sure to be configured
if (logger == null) {
logger = Logger.getInstance(LogCategory.OPENEJB_STARTUP, OpenEjbContainer.class);
}
return logger;
}
代码示例来源:origin: org.apache.tomee/openejb-core
private static Logger logger() { // don't trigger init too eagerly to be sure to be configured
if (logger == null) {
logger = Logger.getInstance(LogCategory.OPENEJB_STARTUP, OpenEjbContainer.class);
}
return logger;
}
代码示例来源:origin: org.apache.openejb/openejb-core
public OpenEJBCommonsLog(final String category) {
this.category = category;
logger = Logger.getInstance(LogCategory.OPENEJB, category);
}
代码示例来源:origin: org.apache.openejb/openejb-core
public LoggingPrintWriter(final String category) {
super(System.err);
logger = Logger.getInstance(LogCategory.OPENEJB.createChild(category), LoggingPrintWriter.class.getName());
}
代码示例来源:origin: org.apache.tomee/openejb-core
public void release() {
for (final CreationalContext<?> cc : creationalContexts.values()) {
try {
cc.release();
} catch (final RuntimeException re) {
Logger.getInstance(LogCategory.OPENEJB, WebContext.class.getName())
.warning("Can't release properly a creational context", re);
}
}
creationalContexts.clear();
}
代码示例来源:origin: org.apache.tomee/openejb-core
@Override
public Object invoke(final Object proxy, final Method method, final Object[] args) throws Throwable {
try {
return method.invoke(findBm(), args);
} catch (final InvocationTargetException ite) {
Logger.getInstance(LogCategory.OPENEJB_JPA, EntityManagerFactoryCallable.class)
.warning("Exception calling CDI, if a lifecycle issue you should maybe set tomee.jpa.factory.lazy=true", ite.getCause());
throw ite.getCause();
}
}
代码示例来源:origin: org.apache.openejb/openejb-core
@Override
public void run() {
try {
//Force a shutdown without waiting for jobs to complete.
s.shutdown(false);
Logger.getInstance(LogCategory.OPENEJB, "org.apache.openejb.util.resources").warning("Forced Quartz stop - Jobs may be incomplete");
} catch (final Throwable e) {
QuartzResourceAdapter.this.ex.set(e);
}
}
};
代码示例来源:origin: org.apache.tomee/openejb-core
@Override
public void run() {
try {
//Force a shutdown without waiting for jobs to complete.
s.shutdown(false);
Logger.getInstance(LogCategory.OPENEJB, "org.apache.openejb.util.resources").warning("Forced Quartz stop - Jobs may be incomplete");
} catch (final Throwable e) {
QuartzResourceAdapter.this.ex.set(e);
}
}
};
代码示例来源:origin: org.apache.tomee/openejb-core
@PostConstruct
public void PostConstruct(final InvocationContext invocationContext) throws Exception {
final long start = System.nanoTime();
record(invocationContext, PostConstruct());
final long end = System.nanoTime();
Logger.getInstance(LogCategory.MONITORING, "org.apache.openejb.monitoring")
.debug("instance.created", invocationContext.getTarget().getClass().getName(), end - start);
}
代码示例来源:origin: org.apache.tomee/openejb-core
@PreDestroy
public void PreDestroy(final InvocationContext invocationContext) throws Exception {
final long start = System.nanoTime();
record(invocationContext, PreDestroy());
final long end = System.nanoTime();
Logger.getInstance(LogCategory.MONITORING, "org.apache.openejb.monitoring")
.debug("instance.discarded", invocationContext.getTarget().getClass().getName(), end - start);
}
代码示例来源:origin: org.apache.tomee/openejb-core
@Override
public void run() {
try {
stopImpl();
} catch (final Throwable t) {
Logger.getInstance(LogCategory.OPENEJB_STARTUP, ActiveMQResourceAdapter.class).getChildLogger("service").error("ActiveMQ shutdown failed", t);
}
}
};
代码示例来源:origin: org.apache.openejb/openejb-multicast
public Tracker build() {
logger = Logger.getInstance(LogCategory.OPENEJB_SERVER.createChild("discovery"), Tracker.class);
return new Tracker(group, heartRate, maxMissedHeartbeats, reconnectDelay, maxReconnectDelay, maxReconnectAttempts, exponentialBackoff, logger, debug);
}
}
代码示例来源:origin: org.apache.openejb/openejb-core
@Override
public void run() {
try {
stopImpl();
} catch (final Throwable t) {
Logger.getInstance(LogCategory.OPENEJB_STARTUP, ActiveMQResourceAdapter.class).getChildLogger("service").error("ActiveMQ shutdown failed", t);
}
}
};
代码示例来源:origin: org.apache.openejb/openejb-core
private void tomeeConfig(final BrokerService broker) {
//Notify when an error occurs on shutdown.
broker.setUseLoggingForShutdownErrors(Logger.getInstance(LogCategory.OPENEJB_STARTUP, ActiveMQ5Factory.class).isErrorEnabled());
}
代码示例来源:origin: org.apache.tomee/openejb-core
private ScheduledExecutorService createScheduledExecutorService() {
ManagedThreadFactory managedThreadFactory;
try {
managedThreadFactory = ThreadFactories.findThreadFactory(threadFactory);
} catch (final Exception e) {
Logger.getInstance(LogCategory.OPENEJB, ManagedScheduledExecutorServiceImplFactory.class).warning("Unable to create configured thread factory: " + threadFactory, e);
managedThreadFactory = new ManagedThreadFactoryImpl();
}
return new ScheduledThreadPoolExecutor(core, managedThreadFactory, CURejectHandler.INSTANCE);
}
代码示例来源:origin: org.apache.tomee/openejb-server
@Override
public void init(final Properties props) throws Exception {
this.logger = Logger.getInstance(LogCategory.OPENEJB_SERVER.createChild("service." + getName()), "org.apache.openejb.server.util.resources");
this.debug = this.logger.isDebugEnabled();
super.init(props);
}
代码示例来源:origin: org.apache.tomee/livereload-tomee
public LiveReloadEndpoint() {
this.watcher = Instances.get().getWatcher();
this.mapper = Instances.get().getMapper();
this.logger = Logger.getInstance(Instances.get().getLogCategory(), LiveReloadEndpoint.class);
}
内容来源于网络,如有侵权,请联系作者删除!