當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。