当前位置: 首页>>代码示例>>Java>>正文


Java InternalLoggerFactory.getInstance方法代码示例

本文整理汇总了Java中io.netty.util.internal.logging.InternalLoggerFactory.getInstance方法的典型用法代码示例。如果您正苦于以下问题:Java InternalLoggerFactory.getInstance方法的具体用法?Java InternalLoggerFactory.getInstance怎么用?Java InternalLoggerFactory.getInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在io.netty.util.internal.logging.InternalLoggerFactory的用法示例。


在下文中一共展示了InternalLoggerFactory.getInstance方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: logMethodCall

import io.netty.util.internal.logging.InternalLoggerFactory; //导入方法依赖的package包/类
public static void logMethodCall(Object object, String methodName, Object[] arguments) {
    String className = getClassName(object);
    String logname = "methodCalls." + className + "." + methodName;
    InternalLogger objLog = InternalLoggerFactory.getInstance(logname);
    if (!objLog.isTraceEnabled()) return;
    StringBuilder msg = new StringBuilder(methodName);
    msg.append("(");
    if (arguments != null) {
        for (int i = 0; i < arguments.length;) {
            msg.append(normalizedValue(arguments[i]));
            if (++i < arguments.length) {
                msg.append(",");
            }
        }
    }
    msg.append(")");
    objLog.log(InternalLogLevel.TRACE, className, msg.toString(), "called from MetaClass.invokeMethod");
}
 
开发者ID:yajsw,项目名称:yajsw,代码行数:19,代码来源:MetaClassHelper.java

示例2: retain

import io.netty.util.internal.logging.InternalLoggerFactory; //导入方法依赖的package包/类
public void retain() {

            if (counter.incrementAndGet() == 1) {

                if (instanceCounter.getAndIncrement() > 0) {
                    InternalLogger instance = InternalLoggerFactory.getInstance(getClass());
                    instance.info("Initialized PauseDetectorWrapper more than once.");
                }

                pauseDetector = new SimplePauseDetector(TimeUnit.MILLISECONDS.toNanos(10), TimeUnit.MILLISECONDS.toNanos(10), 3);
                Runtime.getRuntime().addShutdownHook(new Thread("ShutdownHook for SimplePauseDetector") {
                    @Override
                    public void run() {
                        if (pauseDetector != null) {
                            pauseDetector.shutdown();
                        }
                    }
                });
            }
        }
 
开发者ID:lettuce-io,项目名称:lettuce-core,代码行数:21,代码来源:DefaultCommandLatencyCollector.java

示例3: SpdyFrameLogger

import io.netty.util.internal.logging.InternalLoggerFactory; //导入方法依赖的package包/类
public SpdyFrameLogger(InternalLogLevel level) {
    if (level == null) {
        throw new NullPointerException("level");
    }

    logger = InternalLoggerFactory.getInstance(getClass());
    this.level = level;
}
 
开发者ID:cowthan,项目名称:JavaAyo,代码行数:9,代码来源:SpdyFrameLogger.java

示例4: LoggingHandler

import io.netty.util.internal.logging.InternalLoggerFactory; //导入方法依赖的package包/类
/**
 * Creates a new instance whose logger name is the fully qualified class
 * name of the instance.
 *
 * @param level   the log level
 */
public LoggingHandler(LogLevel level) {
    if (level == null) {
        throw new NullPointerException("level");
    }

    logger = InternalLoggerFactory.getInstance(getClass());
    this.level = level;
    internalLevel = level.toInternalLevel();
}
 
开发者ID:wuyinxian124,项目名称:netty4.0.27Learn,代码行数:16,代码来源:LoggingHandler.java

示例5: LoggingHandler

import io.netty.util.internal.logging.InternalLoggerFactory; //导入方法依赖的package包/类
/**
 * Creates a new instance whose logger name is the fully qualified class
 * name of the instance.
 *
 * @param level the log level
 */
public LoggingHandler(LogLevel level) {
    if (level == null) {
        throw new NullPointerException("level");
    }

    logger = InternalLoggerFactory.getInstance(getClass());
    this.level = level;
    internalLevel = InternalLogLevel.DEBUG;
}
 
开发者ID:krisjey,项目名称:netty.book.kor,代码行数:16,代码来源:LoggingHandler.java

示例6: LoggingHandler

import io.netty.util.internal.logging.InternalLoggerFactory; //导入方法依赖的package包/类
/**
 * Creates a new instance whose logger name is the fully qualified class
 * name of the instance.
 *
 * @param level the log level
 */
public LoggingHandler(LogLevel level) {
    if (level == null) {
        throw new NullPointerException("level");
    }

    logger = InternalLoggerFactory.getInstance(getClass());
    this.level = level;
    internalLevel = level.toInternalLevel();
}
 
开发者ID:nathanchen,项目名称:netty-netty-5.0.0.Alpha1,代码行数:16,代码来源:LoggingHandler.java

示例7: acceptOptions

import io.netty.util.internal.logging.InternalLoggerFactory; //导入方法依赖的package包/类
@Override
public void acceptOptions(List<String> args, File gameDir, File assetsDir, String profile) {
    NailedLauncher.initialize(gameDir);

    System.setOut(new PrintStream(new LoggerOutputStream(LogManager.getLogger("SYSOUT"), Level.INFO), true));
    System.setErr(new PrintStream(new LoggerOutputStream(LogManager.getLogger("SYSERR"), Level.WARN), true));

    InternalLoggerFactory.getInstance("INITLOGGER");
}
 
开发者ID:nailed,项目名称:nailed,代码行数:10,代码来源:ServerTweaker.java

示例8: getLogger

import io.netty.util.internal.logging.InternalLoggerFactory; //导入方法依赖的package包/类
public static InternalLogger getLogger(Class<?> c)
{
	return InternalLoggerFactory.getInstance(c);
}
 
开发者ID:juebanlin,项目名称:util4j,代码行数:5,代码来源:NetLogFactory.java


注:本文中的io.netty.util.internal.logging.InternalLoggerFactory.getInstance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。