本文整理了Java中org.osgl.logging.Logger.trace()
方法的一些代码示例,展示了Logger.trace()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.trace()
方法的具体详情如下:
包路径:org.osgl.logging.Logger
类名称:Logger
方法名:trace
暂无
代码示例来源:origin: actframework/actframework
@Override
protected void releaseResources() {
LOGGER.trace("release job manager resources");
for (Job job : jobs.values()) {
job.destroy();
}
jobs.clear();
executor.getQueue().clear();
executor.shutdownNow();
}
代码示例来源:origin: org.actframework/act-jpa-common
public static void close() {
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("JPA context close");
}
JPAContext cur = cur_.get();
if (null != cur) {
cur.destroy();
cur_.remove();
}
}
代码示例来源:origin: org.actframework/act-jpa-common
public static void init() {
if (LOGGER.isTraceEnabled()) {
ActionContext ctx = ActionContext.current();
if (null == ctx) {
LOGGER.trace("JPA context init");
} else {
LOGGER.trace("JPA context init - " + ctx.req());
}
}
E.illegalStateIf(null != cur_.get(), "JPAContext already set");
cur_.set(new JPAContext());
}
代码示例来源:origin: actframework/actframework
public <T> Future<T> on(DateTime instant, Callable<T> callable) {
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("schedule callable[%s] on %s", callable, instant);
}
DateTime now = DateTime.now();
E.illegalArgumentIf(instant.isBefore(now));
Seconds seconds = Seconds.secondsBetween(now, instant);
return executor().schedule(callable, seconds.getSeconds(), TimeUnit.SECONDS);
}
代码示例来源:origin: org.actframework/act-jpa-common
public static void initForJob() {
if (null != ActionContext.current()) {
return;
}
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("JPA context init for job");
}
E.illegalStateIf(null != cur_.get(), "JPAContext already set");
JPAContext ctx = new JPAContext();
ctx.initForJob = true;
cur_.set(ctx);
}
代码示例来源:origin: org.actframework/act
public <T> Future<T> on(DateTime instant, Callable<T> callable) {
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("schedule callable[%s] on %s", callable, instant);
}
DateTime now = DateTime.now();
E.illegalArgumentIf(instant.isBefore(now));
Seconds seconds = Seconds.secondsBetween(now, instant);
return executor().schedule(callable, seconds.getSeconds(), TimeUnit.SECONDS);
}
代码示例来源:origin: actframework/actframework
final void register(Job job, JobManager manager) {
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("trigger on [%s]: %s", this, job);
}
job.trigger(this);
schedule(manager, job);
}
代码示例来源:origin: actframework/actframework
public void on(DateTime instant, Runnable runnable) {
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("schedule runnable[%s] on %s", runnable, instant);
}
DateTime now = DateTime.now();
E.illegalArgumentIf(instant.isBefore(now));
Seconds seconds = Seconds.secondsBetween(now, instant);
executor().schedule(wrap(runnable), seconds.getSeconds(), TimeUnit.SECONDS);
}
代码示例来源:origin: actframework/actframework
public HandlerEnhancer(final MethodVisitor mv, HandlerMethodMetaInfo meta, final int access, final String name, final String desc, final String signature, final String[] exceptions) {
super(ASM5, new MethodNode(access, name, desc, signature, exceptions));
if (logger.isTraceEnabled()) {
logger.trace("enhance handler: " + meta.fullName());
}
this.info = meta;
this.next = mv;
}
代码示例来源:origin: actframework/actframework
private void sendToConnections(String message, WebSocketConnectionRegistry registry, String key) {
for (WebSocketConnection conn : registry.get(key)) {
if (logger.isTraceEnabled()) {
logger.trace("send to websocket connection by key: %s", key);
}
conn.send(message);
}
}
}
代码示例来源:origin: org.actframework/act
public void on(DateTime instant, Runnable runnable) {
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("schedule runnable[%s] on %s", runnable, instant);
}
DateTime now = DateTime.now();
E.illegalArgumentIf(instant.isBefore(now));
Seconds seconds = Seconds.secondsBetween(now, instant);
executor().schedule(wrap(runnable), seconds.getSeconds(), TimeUnit.SECONDS);
}
代码示例来源:origin: org.actframework/act
private void sendToConnections(String message, WebSocketConnectionRegistry registry, String key) {
for (WebSocketConnection conn : registry.get(key)) {
if (logger.isTraceEnabled()) {
logger.trace("send to websocket connection by key: %s", key);
}
conn.send(message);
}
}
}
代码示例来源:origin: org.actframework/act
public HandlerEnhancer(final MethodVisitor mv, HandlerMethodMetaInfo meta, final int access, final String name, final String desc, final String signature, final String[] exceptions) {
super(ASM5, new MethodNode(access, name, desc, signature, exceptions));
if (logger.isTraceEnabled()) {
logger.trace("enhance handler: " + meta.fullName());
}
this.info = meta;
this.next = mv;
}
代码示例来源:origin: actframework/actframework
@Override
public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {
logger.trace("Scanning %s", name);
classInfo.className(name);
if (isAbstract(access)) {
classInfo.setAbstract();
}
super.visit(version, access, name, signature, superName, interfaces);
}
代码示例来源:origin: actframework/actframework
@Override
public void onTimerStop(Timer timer) {
String name = timer.name();
long ns = timer.ns();
logger(name).trace("Timer[%s] stopped. Time elapsed: %sns", name, ns);
onTimerStop_(name, ns);
}
代码示例来源:origin: actframework/actframework
@Override
public void onTimerStart(String name) {
E.illegalArgumentIf(S.blank(name), "name expected");
countOnce_(name);
logger(name).trace("Timer[%s] started", name);
}
代码示例来源:origin: org.actframework/act
@Override
public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {
logger.trace("Scanning %s", name);
classInfo.className(name);
if (isAbstract(access)) {
classInfo.setAbstract();
}
super.visit(version, access, name, signature, superName, interfaces);
}
代码示例来源:origin: actframework/actframework
public void scheduleFind() {
if (logger.isTraceEnabled()) {
logger.trace("schedule class finding for %s", this);
}
final App app = App.instance();
app.jobManager().on(when, jobId(), new Runnable() {
@Override
public void run() {
how.find(app, ClassFinderData.this);
}
});
}
代码示例来源:origin: org.actframework/act
public void scheduleFind() {
if (logger.isTraceEnabled()) {
logger.trace("schedule class finding for %s", this);
}
final App app = App.instance();
app.jobManager().on(when, jobId(), new Runnable() {
@Override
public void run() {
how.find(app, ClassFinderData.this);
}
});
}
代码示例来源:origin: actframework/actframework
private void initExecutor(App app) {
int poolSize = app.config().jobPoolSize();
executor = new ScheduledThreadPoolExecutor(poolSize, new AppThreadFactory("jobs"), new ThreadPoolExecutor.AbortPolicy());
executor.setRemoveOnCancelPolicy(true);
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("init executor with thread pool: %s", poolSize);
}
}
内容来源于网络,如有侵权,请联系作者删除!