本文整理匯總了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");
}
示例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();
}
}
});
}
}
示例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;
}
示例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();
}
示例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;
}
示例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();
}
示例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");
}
示例8: getLogger
import io.netty.util.internal.logging.InternalLoggerFactory; //導入方法依賴的package包/類
public static InternalLogger getLogger(Class<?> c)
{
return InternalLoggerFactory.getInstance(c);
}