Java Code Examples for org.apache.logging.log4j.Logger#getMessageFactory()
The following examples show how to use
org.apache.logging.log4j.Logger#getMessageFactory() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SetLoggerTagTest.java From logging-log4j2 with Apache License 2.0 | 5 votes |
private static void checkMessageFactory(final String msg, final MessageFactory messageFactory, final Logger testLogger) { if (messageFactory == null) { assertEquals(msg, AbstractLogger.DEFAULT_MESSAGE_FACTORY_CLASS, testLogger.getMessageFactory().getClass()); } else { MessageFactory actual = testLogger.getMessageFactory(); assertEquals(msg, messageFactory, actual); } }
Example 2
Source File: LoggerTest.java From logging-log4j2 with Apache License 2.0 | 5 votes |
private static void checkMessageFactory(final MessageFactory messageFactory, final Logger testLogger) { if (messageFactory == null) { assertEquals(AbstractLogger.DEFAULT_MESSAGE_FACTORY_CLASS, testLogger.getMessageFactory().getClass()); } else { MessageFactory actual = testLogger.getMessageFactory(); assertEquals(messageFactory, actual); } }
Example 3
Source File: Log4J2Logger.java From netty-4.1.22 with Apache License 2.0 | 4 votes |
Log4J2Logger(Logger logger) { super((ExtendedLogger) logger, logger.getName(), logger.getMessageFactory()); }
Example 4
Source File: Log4J2Logger.java From getty with Apache License 2.0 | 4 votes |
Log4J2Logger(Logger logger) { super((ExtendedLogger) logger, logger.getName(), logger.getMessageFactory()); if (VARARGS_ONLY) { throw new UnsupportedOperationException("Log4J2 version mismatch"); } }
Example 5
Source File: BHBotLogger.java From BHBot with GNU General Public License v3.0 | 4 votes |
private BHBotLogger(final Logger logger) { super((AbstractLogger) logger, logger.getName(), logger.getMessageFactory()); this.logger = this; }
Example 6
Source File: Log4J2Logger.java From mynlp with Apache License 2.0 | 4 votes |
Log4J2Logger(Logger logger) { super((ExtendedLogger) logger, logger.getName(), logger.getMessageFactory()); }
Example 7
Source File: MuLogger.java From vethrfolnir-mu with GNU General Public License v3.0 | 4 votes |
public static MuLogger getLogger(Class<?> type) { Logger logger = LogManager.getLogger(type); return new MuLogger((AbstractLogger) logger, logger.getName(), logger.getMessageFactory()); }
Example 8
Source File: MuLogger.java From vethrfolnir-mu with GNU General Public License v3.0 | 4 votes |
public static MuLogger getLogger(String name) { Logger logger = LogManager.getLogger(name); return new MuLogger((AbstractLogger) logger, logger.getName(), logger.getMessageFactory()); }