本文整理汇总了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);
}