List of usage examples for io.netty.util.internal.logging InternalLoggerFactory getInstance
public static InternalLogger getInstance(String name)
From source file:com.flysoloing.learning.network.netty.spdy.client.SpdyFrameLogger.java
License:Apache License
public SpdyFrameLogger(InternalLogLevel level) { if (level == null) { throw new NullPointerException("level"); }//from w w w . j a v a 2 s . co m logger = InternalLoggerFactory.getInstance(getClass()); this.level = level; }
From source file:com.github.nettybook.ch0.LoggingHandler.java
License:Apache License
/** * Creates a new instance whose logger name is the fully qualified class * name of the instance./*from w ww .j av a 2 s.c om*/ * * @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; }
From source file:com.github.nettybook.ch0.LoggingHandler.java
License:Apache License
/** * Creates a new instance with the specified logger name. * * @param clazz the class type to generate the logger for * @param level the log level// w ww . j ava 2 s . com */ public LoggingHandler(Class<?> clazz, LogLevel level) { if (clazz == null) { throw new NullPointerException("clazz"); } if (level == null) { throw new NullPointerException("level"); } logger = InternalLoggerFactory.getInstance(clazz); this.level = level; internalLevel = InternalLogLevel.DEBUG; }
From source file:com.github.nettybook.ch0.LoggingHandler.java
License:Apache License
/** * Creates a new instance with the specified logger name. * * @param name the name of the class to use for the logger * @param level the log level/*from www . j ava2 s . co m*/ */ public LoggingHandler(String name, LogLevel level) { if (name == null) { throw new NullPointerException("name"); } if (level == null) { throw new NullPointerException("level"); } logger = InternalLoggerFactory.getInstance(name); this.level = level; internalLevel = InternalLogLevel.DEBUG; }
From source file:com.lance.appengine.spdy.SpdyFrameLogger.java
License:Apache License
public SpdyFrameLogger(InternalLogLevel level) { logger = InternalLoggerFactory.getInstance(getClass()); this.level = level; }
From source file:gedi.remote.ConfigLoggingHandler.java
License:Apache License
/** * Creates a new instance whose logger name is the fully qualified class * name of the instance.//from w w w . ja va2 s . c om * * @param level the log level */ public ConfigLoggingHandler(LogLevel level) { if (level == null) { throw new NullPointerException("level"); } logger = InternalLoggerFactory.getInstance(getClass()); this.level = level; internalLevel = level.toInternalLevel(); }
From source file:gedi.remote.ConfigLoggingHandler.java
License:Apache License
/** * Creates a new instance with the specified logger name. * * @param clazz the class type to generate the logger for * @param level the log level/*from w w w. java2s .co m*/ */ public ConfigLoggingHandler(Class<?> clazz, LogLevel level) { if (clazz == null) { throw new NullPointerException("clazz"); } if (level == null) { throw new NullPointerException("level"); } logger = InternalLoggerFactory.getInstance(clazz); this.level = level; internalLevel = level.toInternalLevel(); }
From source file:gedi.remote.ConfigLoggingHandler.java
License:Apache License
/** * Creates a new instance with the specified logger name. * * @param name the name of the class to use for the logger * @param level the log level/*w ww . j av a2s . c o m*/ */ public ConfigLoggingHandler(String name, LogLevel level) { if (name == null) { throw new NullPointerException("name"); } if (level == null) { throw new NullPointerException("level"); } logger = InternalLoggerFactory.getInstance(name); this.level = level; internalLevel = level.toInternalLevel(); }
From source file:io.netty.example.spdy.client.SpdyFrameLogger.java
License:Apache License
public SpdyFrameLogger(InternalLogLevel level) { this.level = ObjectUtil.checkNotNull(level, "level"); this.logger = InternalLoggerFactory.getInstance(getClass()); }
From source file:kr.pe.codda.server.task.ToLetterCarrier.java
License:Apache License
public static void putInputErrorMessageToOutputMessageQueue(SelfExn.ErrorType errorType, String errorReason, int mailboxID, int mailID, String messageID, AcceptedConnection fromAcceptedConnection, MessageProtocolIF messageProtocol) throws InterruptedException { if (null == errorType) { throw new IllegalArgumentException("the parameter errorType is null"); }/* w w w.j av a 2 s . c o m*/ if (null == errorReason) { throw new IllegalArgumentException("the parameter errorReason is null"); } if (null == fromAcceptedConnection) { throw new IllegalArgumentException("the parameter fromSocketResource is null"); } if (null == messageProtocol) { throw new IllegalArgumentException("the parameter messageProtocol is null"); } SelfExnRes selfExnRes = buildSelfExn(mailboxID, mailID, messageID, errorType, errorReason); ArrayDeque<WrapBuffer> wrapBufferListOfSelfExn = null; try { wrapBufferListOfSelfExn = messageProtocol.M2S(selfExnRes, CommonStaticFinalVars.SELFEXN_ENCODER); } catch (Exception e) { InternalLogger log = InternalLoggerFactory.getInstance(ToLetterCarrier.class); String errorMessage = new StringBuilder() .append("fail to build a output stream of the output message SelfExnRes[") .append(selfExnRes.toString()).append("] to send to from-client[") .append(fromAcceptedConnection.toSimpleInfomation()) .append("] because of unknown error, errmsg=").append(e.getMessage()).toString(); log.warn(errorMessage, e); return; } fromAcceptedConnection.addOutputMessage(selfExnRes, wrapBufferListOfSelfExn); }