当前位置: 首页 > 知识库问答 >
问题:

导致java应用程序凝视延迟的log4j2

郎献
2023-03-14

我在java应用程序中使用log4j2。就日志功能而言,一切都很好,但是在启动应用程序时,它似乎会导致非常明显的延迟。

我已经把代码剥离到基本的

public static void main(String[] args) 
{
 System.out.println("TEST");
}

如果不包括log4j2,那么当我运行应用程序时,控制台中就会出现“TEST”,包括构建路径中的log4j2代码和文件夹,这会导致测试出现时间延迟40-50秒。

<?xml version="1.0" encoding="UTF-8"?>
<configuration status="warn" name="app" packages="" monitorInterval="30">
<properties>
    <property name="name">app</property>
    <property name="pattern">%d{yyyy-MM-dd HH:mm:ss.SSS} | %-5.5p | %-10.10t | %-20.20C:%-5.5L | %msg%n</property>
    <property name="pattern">%d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"</property>
</properties>
<appenders>
    <Console name="Console" target="SYSTEM_OUT">
        <PatternLayout pattern="${pattern}"/>
    </Console>
    <!-- File for logging general Application -->
    <RollingFile name="logGenApp" fileName="utils/AppGeneral.log" immediateFlush="true" filePattern="AppGeneral-%d{yyyy-MM-dd}.log">
        <PatternLayout>
            <pattern>"%d{YYYY-MM-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"</pattern>
        </PatternLayout>
        <Policies>
            <TimeBasedTriggeringPolicy/> <!-- Rotated everyday -->
            <SizeBasedTriggeringPolicy size="1 MB"/> <!-- OR every 1 Mb -->
        </Policies>
        <DefaultRolloverStrategy max="92"/>
    </RollingFile>
    <!-- File for logging Database -->
    <RollingFile name="logDb" fileName="utils/Database.log" immediateFlush="true" filePattern="DB-%d{yyyy-MM-dd}.log">
        <PatternLayout>
            <pattern>"%d{YYYY-MM-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"</pattern>
        </PatternLayout>
        <Policies>
            <TimeBasedTriggeringPolicy/> <!-- Rotated everyday -->
            <SizeBasedTriggeringPolicy size="1 MB"/> <!-- OR every 1 Mb -->
        </Policies>
        <DefaultRolloverStrategy max="92"/>
    </RollingFile>
    <!-- File for logging Gui -->
    <RollingFile name="logGui" fileName="utils/Gui.log" immediateFlush="true" filePattern="DB-%d{yyyy-MM-dd}.log">
        <PatternLayout>
            <pattern>"%d{YYYY-MM-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"</pattern>
        </PatternLayout>
        <Policies>
            <TimeBasedTriggeringPolicy/> <!-- Rotated everyday -->
            <SizeBasedTriggeringPolicy size="1 MB"/> <!-- OR every 1 Mb -->
        </Policies>
        <DefaultRolloverStrategy max="92"/>
    </RollingFile>
    <!-- File for logging AXL -->
    <RollingFile name="logAxl" fileName="utils/AXL.log" immediateFlush="true" filePattern="DB-%d{yyyy-MM-dd}.log">
        <PatternLayout>
            <pattern>"%d{YYYY-MM-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"</pattern>
        </PatternLayout>
        <Policies>
            <TimeBasedTriggeringPolicy/> <!-- Rotated everyday -->
            <SizeBasedTriggeringPolicy size="1 MB"/> <!-- OR every 1 Mb -->
        </Policies>
        <DefaultRolloverStrategy max="92"/>
    </RollingFile>
</appenders>

<!-- define all loggers -->
<loggers>
    <logger name="uk.co.netpacket.NetPacketQuickPhoneAdmin" level="debug" additivity="false">
        <appender-ref ref="Console"/> <!-- To console -->
        <appender-ref ref="logGenApp"/> <!-- And to a rotated file -->
    </logger>
    <logger name="uk.co.netpacket.utils.db" level="debug" additivity="false">
        <appender-ref ref="Console"/> <!-- To console -->
        <appender-ref ref="logDb"/> <!-- And to a rotated file -->
    </logger>
    <logger name="uk.co.netpacket.gui" level="debug" additivity="false">
        <appender-ref ref="Console"/> <!-- To console -->
        <appender-ref ref="logGui"/> <!-- And to a rotated file -->
    </logger>
    <logger name="uk.co.netpacket.utils.gui" level="debug" additivity="false">
        <appender-ref ref="Console"/> <!-- To console -->
        <appender-ref ref="logGui"/> <!-- And to a rotated file -->
    </logger>
    <logger name="uk.co.netpacket.utils.axl" level="debug" additivity="false">
        <appender-ref ref="Console"/> <!-- To console -->
        <appender-ref ref="logAxl"/> <!-- And to a rotated file -->
    </logger>
    <root level="debug"> <!-- We log only errors -->
        <appender-ref ref="Console"/> <!-- To console -->
    </root>
</loggers>
</configuration>

log4j2.xml中设置为跟踪的标志

2013-09-17 10:51:19,678 DEBUG Found Plugin Map at jar:file:/C:/Users/katsavra/Dropbox/Work/Development/Code/Java/NetQuickPhone/eclipse/NetPacket%20Quick%20Phone%20Admin/lib/log4j-core-2.0-beta8.jar!/org/apache/logging/log4j/core/config/plugins/Log4j2Plugins.dat
2013-09-17 10:51:21,236 DEBUG Generated plugins in 1.557776437 seconds
2013-09-17 10:51:22,586 DEBUG Generated plugins in 1.349766816 seconds
2013-09-17 10:51:23,909 DEBUG Generated plugins in 1.322196820 seconds
2013-09-17 10:51:25,189 DEBUG Generated plugins in 1.278701201 seconds
2013-09-17 10:51:26,453 DEBUG Generated plugins in 1.264382587 seconds
2013-09-17 10:51:27,729 DEBUG Generated plugins in 1.274849980 seconds
2013-09-17 10:51:29,021 DEBUG Generated plugins in 1.292089766 seconds
2013-09-17 10:51:30,322 DEBUG Generated plugins in 1.300759774 seconds
2013-09-17 10:51:31,612 DEBUG Generated plugins in 1.288325335 seconds
2013-09-17 10:51:32,897 DEBUG Generated plugins in 1.285022848 seconds
2013-09-17 10:51:34,169 DEBUG Generated plugins in 1.270656640 seconds
2013-09-17 10:51:35,471 DEBUG Generated plugins in 1.302089055 seconds
2013-09-17 10:51:36,770 DEBUG Generated plugins in 1.298296067 seconds
2013-09-17 10:51:38,042 DEBUG Generated plugins in 1.272078870 seconds
2013-09-17 10:51:39,350 DEBUG Generated plugins in 1.307845169 seconds
2013-09-17 10:51:40,708 DEBUG Generated plugins in 1.358007914 seconds
2013-09-17 10:51:42,024 DEBUG Generated plugins in 1.314295601 seconds
2013-09-17 10:51:43,303 DEBUG Generated plugins in 1.277935213 seconds
2013-09-17 10:51:44,610 DEBUG Generated plugins in 1.307066303 seconds
2013-09-17 10:51:45,912 DEBUG Generated plugins in 1.301911556 seconds
2013-09-17 10:51:47,177 DEBUG Generated plugins in 1.264756622 seconds
2013-09-17 10:51:48,474 DEBUG Generated plugins in 1.296256790 seconds
2013-09-17 10:51:49,813 DEBUG Generated plugins in 1.339032335 seconds
2013-09-17 10:51:51,088 DEBUG Generated plugins in 1.273299525 seconds
2013-09-17 10:51:52,356 DEBUG Generated plugins in 1.267910166 seconds
2013-09-17 10:51:53,648 DEBUG Generated plugins in 1.291765565 seconds
2013-09-17 10:51:54,935 DEBUG Generated plugins in 1.286614179 seconds
2013-09-17 10:51:56,215 DEBUG Generated plugins in 1.279507505 seconds
2013-09-17 10:51:57,499 DEBUG Generated plugins in 1.283563102 seconds
2013-09-17 10:51:58,816 DEBUG Generated plugins in 1.316436226 seconds
2013-09-17 10:52:00,102 DEBUG Generated plugins in 1.285968016 seconds
2013-09-17 10:52:01,383 DEBUG Generated plugins in 1.280116153 seconds
2013-09-17 10:52:02,676 DEBUG Generated plugins in 1.292500757 seconds
2013-09-17 10:52:03,957 DEBUG Generated plugins in 1.280316609 seconds
2013-09-17 10:52:05,238 DEBUG Generated plugins in 1.280846866 seconds
2013-09-17 10:52:06,484 DEBUG Generated plugins in 1.245982059 seconds
2013-09-17 10:52:07,745 DEBUG Generated plugins in 1.260707744 seconds
2013-09-17 10:52:09,053 DEBUG Generated plugins in 1.307244921 seconds
2013-09-17 10:52:10,317 DEBUG Generated plugins in 1.264032629 seconds
2013-09-17 10:52:11,571 DEBUG Generated plugins in 1.252440329 seconds
2013-09-17 10:52:12,856 DEBUG Generated plugins in 1.284874465 seconds
2013-09-17 10:52:14,131 DEBUG Generated plugins in 1.274280528 seconds
2013-09-17 10:52:15,382 DEBUG Generated plugins in 1.250523118 seconds
2013-09-17 10:52:16,664 DEBUG Generated plugins in 1.281563580 seconds
2013-09-17 10:52:17,929 DEBUG Generated plugins in 1.264700069 seconds
2013-09-17 10:52:19,232 DEBUG Generated plugins in 1.303086856 seconds
2013-09-17 10:52:20,499 DEBUG Generated plugins in 1.266067986 seconds
2013-09-17 10:52:21,833 DEBUG Generated plugins in 1.332428481 seconds
2013-09-17 10:52:23,088 DEBUG Generated plugins in 1.255274152 seconds
2013-09-17 10:52:24,367 DEBUG Generated plugins in 1.278314287 seconds
2013-09-17 10:52:25,640 DEBUG Generated plugins in 1.272656162 seconds
2013-09-17 10:52:26,907 DEBUG Generated plugins in 1.267301519 seconds
2013-09-17 10:52:28,173 DEBUG Generated plugins in 1.264851251 seconds
2013-09-17 10:52:28,183 DEBUG Calling createProperty on class     org.apache.logging.log4j.core.config.Property for element property with params(name="name", value="app")
2013-09-17 10:52:28,184 DEBUG Calling createProperty on class org.apache.logging.log4j.core.config.Property for element property with params(name="pattern", value="%d{yyyy-MM-dd HH:mm:ss.SSS} | %-5.5p | %-10.10t | %-20.20C:%-5.5L | %msg%n")
2013-09-17 10:52:28,184 DEBUG Calling createProperty on class org.apache.logging.log4j.core.config.Property for element property with params(name="pattern", value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"")
2013-09-17 10:52:28,190 DEBUG Calling configureSubstitutor on class org.apache.logging.log4j.core.config.plugins.PropertiesPlugin for element properties with params(properties={name=app, pattern=%d{yyyy-MM-dd HH:mm:ss.SSS} | %-5.5p | %-10.10t | %-20.20C:%-5.5L | %msg%n, pattern=%d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"}, Configuration(app))
2013-09-17 10:52:29,580 DEBUG Generated plugins in 1.389516481 seconds
2013-09-17 10:52:29,582 DEBUG Calling createLayout on class org.apache.logging.log4j.core.layout.PatternLayout for element PatternLayout with params(pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"", Configuration(app), null, charset="null", suppressExceptions="null")
2013-09-17 10:52:31,030 DEBUG Generated plugins in 1.446840212 seconds
2013-09-17 10:52:31,032 DEBUG Calling createAppender on class org.apache.logging.log4j.core.appender.ConsoleAppender for element Console with params(PatternLayout(%d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"), null, target="SYSTEM_OUT", name="Console", follow="null", suppressExceptions="null")
2013-09-17 10:52:31,033 DEBUG Jansi is not installed
2013-09-17 10:52:31,034 DEBUG Calling createLayout on class org.apache.logging.log4j.core.layout.PatternLayout for element PatternLayout with params(pattern=""%d{YYYY-MM-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"", Configuration(app), null, charset="null", suppressExceptions="null")
2013-09-17 10:52:31,035 DEBUG Calling createPolicy on class org.apache.logging.log4j.core.appender.rolling.TimeBasedTriggeringPolicy for element TimeBasedTriggeringPolicy with params(interval="null", modulate="null")
2013-09-17 10:52:31,037 DEBUG Calling createPolicy on class org.apache.logging.log4j.core.appender.rolling.SizeBasedTriggeringPolicy for element SizeBasedTriggeringPolicy with params(size="1 MB")
2013-09-17 10:52:31,038 DEBUG Calling createPolicy on class org.apache.logging.log4j.core.appender.rolling.CompositeTriggeringPolicy for element Policies with params(policies={TimeBasedTriggeringPolicy, SizeBasedTriggeringPolicy(size=1048576)})
2013-09-17 10:52:31,039 DEBUG Calling createStrategy on class org.apache.logging.log4j.core.appender.rolling.DefaultRolloverStrategy for element DefaultRolloverStrategy with params(max="92", min="null", fileIndex="null", Configuration(app))
2013-09-17 10:52:31,041 DEBUG Calling createAppender on class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile with params(fileName="utils/AppGeneral.log", filePattern="AppGeneral-%d{yyyy-MM-dd}.log", append="null", name="logGenApp", bufferedIO="null", immediateFlush="true", Policies(CompositeTriggeringPolicy{TimeBasedTriggeringPolicy, SizeBasedTriggeringPolicy(size=1048576)}), DefaultRolloverStrategy(DefaultRolloverStrategy(min=1, max=92)), PatternLayout("%d{YYYY-MM-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"), null, suppressExceptions="null", advertise="null", advertiseURI="null", Configuration(app))
2013-09-17 10:52:31,045 DEBUG Starting RollingFileManager utils/AppGeneral.log
2013-09-17 10:52:32,575 DEBUG Generated plugins in 1.527935353 seconds
2013-09-17 10:52:32,579 DEBUG Calling createLayout on class org.apache.logging.log4j.core.layout.PatternLayout for element PatternLayout with params(pattern=""%d{YYYY-MM-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"", Configuration(app), null, charset="null", suppressExceptions="null")
2013-09-17 10:52:32,580 DEBUG Calling createPolicy on class org.apache.logging.log4j.core.appender.rolling.TimeBasedTriggeringPolicy for element TimeBasedTriggeringPolicy with params(interval="null", modulate="null")
2013-09-17 10:52:32,581 DEBUG Calling createPolicy on class org.apache.logging.log4j.core.appender.rolling.SizeBasedTriggeringPolicy for element SizeBasedTriggeringPolicy with params(size="1 MB")
2013-09-17 10:52:32,582 DEBUG Calling createPolicy on class org.apache.logging.log4j.core.appender.rolling.CompositeTriggeringPolicy for element Policies with params(policies={TimeBasedTriggeringPolicy, SizeBasedTriggeringPolicy(size=1048576)})
2013-09-17 10:52:32,582 DEBUG Calling createStrategy on class org.apache.logging.log4j.core.appender.rolling.DefaultRolloverStrategy for element DefaultRolloverStrategy with params(max="92", min="null", fileIndex="null", Configuration(app))
2013-09-17 10:52:32,584 DEBUG Calling createAppender on class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile with params(fileName="utils/Database.log", filePattern="DB-%d{yyyy-MM-dd}.log", append="null", name="logDb", bufferedIO="null", immediateFlush="true", Policies(CompositeTriggeringPolicy{TimeBasedTriggeringPolicy, SizeBasedTriggeringPolicy(size=1048576)}), DefaultRolloverStrategy(DefaultRolloverStrategy(min=1, max=92)), PatternLayout("%d{YYYY-MM-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"), null, suppressExceptions="null", advertise="null", advertiseURI="null", Configuration(app))
2013-09-17 10:52:32,585 DEBUG Starting RollingFileManager utils/Database.log
2013-09-17 10:52:34,109 DEBUG Generated plugins in 1.523256549 seconds
2013-09-17 10:52:34,110 DEBUG Calling createLayout on class org.apache.logging.log4j.core.layout.PatternLayout for element PatternLayout with params(pattern=""%d{YYYY-MM-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"", Configuration(app), null, charset="null", suppressExceptions="null")
2013-09-17 10:52:34,111 DEBUG Calling createPolicy on class org.apache.logging.log4j.core.appender.rolling.TimeBasedTriggeringPolicy for element     TimeBasedTriggeringPolicy with params(interval="null", modulate="null")
2013-09-17 10:52:34,111 DEBUG Calling createPolicy on class     org.apache.logging.log4j.core.appender.rolling.SizeBasedTriggeringPolicy for element SizeBasedTriggeringPolicy with params(size="1 MB")
2013-09-17 10:52:34,112 DEBUG Calling createPolicy on class org.apache.logging.log4j.core.appender.rolling.CompositeTriggeringPolicy for element Policies with params(policies={TimeBasedTriggeringPolicy, SizeBasedTriggeringPolicy(size=1048576)})
2013-09-17 10:52:34,113 DEBUG Calling createStrategy on class org.apache.logging.log4j.core.appender.rolling.DefaultRolloverStrategy for element DefaultRolloverStrategy with params(max="92", min="null", fileIndex="null", Configuration(app))
2013-09-17 10:52:34,115 DEBUG Calling createAppender on class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile with params(fileName="utils/Gui.log", filePattern="DB-%d{yyyy-MM-dd}.log", append="null", name="logGui", bufferedIO="null", immediateFlush="true", Policies(CompositeTriggeringPolicy{TimeBasedTriggeringPolicy,     SizeBasedTriggeringPolicy(size=1048576)}), DefaultRolloverStrategy(DefaultRolloverStrategy(min=1, max=92)), PatternLayout("%d{YYYY-MM-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"), null, suppressExceptions="null", advertise="null", advertiseURI="null", Configuration(app))
2013-09-17 10:52:34,116 DEBUG Starting RollingFileManager utils/Gui.log
2013-09-17 10:52:35,637 DEBUG Generated plugins in 1.520764846 seconds
2013-09-17 10:52:35,638 DEBUG Calling createLayout on class org.apache.logging.log4j.core.layout.PatternLayout for element PatternLayout with params(pattern=""%d{YYYY-MM-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"", Configuration(app), null, charset="null", suppressExceptions="null")
2013-09-17 10:52:35,639 DEBUG Calling createPolicy on class org.apache.logging.log4j.core.appender.rolling.TimeBasedTriggeringPolicy for element TimeBasedTriggeringPolicy with params(interval="null", modulate="null")
2013-09-17 10:52:35,639 DEBUG Calling createPolicy on class org.apache.logging.log4j.core.appender.rolling.SizeBasedTriggeringPolicy for element SizeBasedTriggeringPolicy with params(size="1 MB")
2013-09-17 10:52:35,640 DEBUG Calling createPolicy on class org.apache.logging.log4j.core.appender.rolling.CompositeTriggeringPolicy for element Policies with params(policies={TimeBasedTriggeringPolicy, SizeBasedTriggeringPolicy(size=1048576)})
2013-09-17 10:52:35,640 DEBUG Calling createStrategy on class org.apache.logging.log4j.core.appender.rolling.DefaultRolloverStrategy for element DefaultRolloverStrategy with params(max="92", min="null", fileIndex="null", Configuration(app))
2013-09-17 10:52:35,642 DEBUG Calling createAppender on class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile with params(fileName="utils/AXL.log", filePattern="DB-%d{yyyy-MM-dd}.log", append="null", name="logAxl", bufferedIO="null", immediateFlush="true", Policies(CompositeTriggeringPolicy{TimeBasedTriggeringPolicy, SizeBasedTriggeringPolicy(size=1048576)}), DefaultRolloverStrategy(DefaultRolloverStrategy(min=1, max=92)), PatternLayout("%d{YYYY-MM-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"), null, suppressExceptions="null", advertise="null", advertiseURI="null", Configuration(app))
2013-09-17 10:52:35,644 DEBUG Starting RollingFileManager utils/AXL.log
2013-09-17 10:52:37,203 DEBUG Generated plugins in 1.558124716 seconds
2013-09-17 10:52:37,204 DEBUG Calling createAppenders on class org.apache.logging.log4j.core.config.plugins.AppendersPlugin for element appenders with params(appenders={Console, logGenApp, logDb, logGui, logAxl})
2013-09-17 10:52:37,205 DEBUG Calling createAppenderRef on class org.apache.logging.log4j.core.config.AppenderRef for element appender-ref with params(ref="Console", level="null", null)
2013-09-17 10:52:37,205 DEBUG Calling createAppenderRef on class org.apache.logging.log4j.core.config.AppenderRef for element appender-ref with params(ref="logGenApp", level="null", null)
2013-09-17 10:52:37,208 DEBUG Calling createLogger on class org.apache.logging.log4j.core.config.LoggerConfig for element logger with params(additivity="false", level="debug", name="uk.co.netpacket.NetPacketQuickPhoneAdmin", includeLocation="null", appender-ref={org.apache.logging.log4j.core.config.AppenderRef@1518f00, org.apache.logging.log4j.core.config.AppenderRef@18377d6}, properties={}, Configuration(app), null)
2013-09-17 10:52:37,214 DEBUG Calling createAppenderRef on class org.apache.logging.log4j.core.config.AppenderRef for element appender-ref with params(ref="Console", level="null", null)
2013-09-17 10:52:37,214 DEBUG Calling createAppenderRef on class org.apache.logging.log4j.core.config.AppenderRef for element appender-ref with params(ref="logDb", level="null", null)
2013-09-17 10:52:37,216 DEBUG Calling createLogger on class org.apache.logging.log4j.core.config.LoggerConfig for element logger with params(additivity="false", level="debug", name="uk.co.netpacket.utils.db", includeLocation="null", appender-ref={org.apache.logging.log4j.core.config.AppenderRef@5a3fa0, org.apache.logging.log4j.core.config.AppenderRef@1072ac9}, properties={}, Configuration(app), null)
2013-09-17 10:52:37,217 DEBUG Calling createAppenderRef on class org.apache.logging.log4j.core.config.AppenderRef for element appender-ref with params(ref="Console", level="null", null)
2013-09-17 10:52:37,218 DEBUG Calling createAppenderRef on class org.apache.logging.log4j.core.config.AppenderRef for element appender-ref with params(ref="logGui", level="null", null)
2013-09-17 10:52:37,219 DEBUG Calling createLogger on class org.apache.logging.log4j.core.config.LoggerConfig for element logger with params(additivity="false", level="debug", name="uk.co.netpacket.gui", includeLocation="null", appender-ref={org.apache.logging.log4j.core.config.AppenderRef@18a24e9, org.apache.logging.log4j.core.config.AppenderRef@7d7427}, properties={}, Configuration(app), null)
2013-09-17 10:52:37,219 DEBUG Calling createAppenderRef on class org.apache.logging.log4j.core.config.AppenderRef for element appender-ref with params(ref="Console", level="null", null)
2013-09-17 10:52:37,220 DEBUG Calling createAppenderRef on class org.apache.logging.log4j.core.config.AppenderRef for element appender-ref with params(ref="logGui", level="null", null)
2013-09-17 10:52:37,221 DEBUG Calling createLogger on class org.apache.logging.log4j.core.config.LoggerConfig for element logger with params(additivity="false", level="debug", name="uk.co.netpacket.utils.gui", includeLocation="null", appender-ref={org.apache.logging.log4j.core.config.AppenderRef@54ca71, org.apache.logging.log4j.core.config.AppenderRef@b6c1e9}, properties={}, Configuration(app), null)
2013-09-17 10:52:37,222 DEBUG Calling createAppenderRef on class org.apache.logging.log4j.core.config.AppenderRef for element appender-ref with params(ref="Console", level="null", null)
2013-09-17 10:52:37,222 DEBUG Calling createAppenderRef on class org.apache.logging.log4j.core.config.AppenderRef for element appender-ref with params(ref="logAxl", level="null", null)
2013-09-17 10:52:37,223 DEBUG Calling createLogger on class org.apache.logging.log4j.core.config.LoggerConfig for element logger with params(additivity="false", level="debug", name="uk.co.netpacket.utils.axl", includeLocation="null", appender-ref={org.apache.logging.log4j.core.config.AppenderRef@74ae84, org.apache.logging.log4j.core.config.AppenderRef@6d75fd}, properties={}, Configuration(app), null)
2013-09-17 10:52:37,224 DEBUG Calling createAppenderRef on class org.apache.logging.log4j.core.config.AppenderRef for element appender-ref with params(ref="Console", level="null", null)
2013-09-17 10:52:37,225 DEBUG Calling createLogger on class org.apache.logging.log4j.core.config.LoggerConfig$RootLogger for element root with params(additivity="null", level="debug", includeLocation="null", appender-ref={org.apache.logging.log4j.core.config.AppenderRef@a487bb}, properties={}, Configuration(app), null)
2013-09-17 10:52:37,227 DEBUG Calling createLoggers on class     org.apache.logging.log4j.core.config.plugins.LoggersPlugin for element loggers with params(loggers={uk.co.netpacket.NetPacketQuickPhoneAdmin, uk.co.netpacket.utils.db, uk.co.netpacket.gui, uk.co.netpacket.utils.gui, uk.co.netpacket.utils.axl, root})
2013-09-17 10:52:37,229 DEBUG Reconfiguration completed
2013-09-17 10:52:37.347 [main] INFO  uk.co.netpacket.NetPacketQuickPhoneAdmin - Application started
"2013-09-17 10:52:37.352 [main] INFO  uk.co.netpacket.NetPacketQuickPhoneAdmin - Trying to connecto DB:utils\NetPacketQPA.sqlite
"2013-09-17 10:52:37.559 [main] INFO  uk.co.netpacket.NetPacketQuickPhoneAdmin - Connection to db successful
"2013-09-17 10:52:37.560 [main] INFO  uk.co.netpacket.NetPacketQuickPhoneAdmin - Start process to load data
"2013-09-17 10:52:37.565 [main] INFO  uk.co.netpacket.NetPacketQuickPhoneAdmin - Start to load Application data from db into objects
"2013-09-17 10:52:37.565 [main] INFO  uk.co.netpacket.utils.db.LoadData - Start to load data from CM Table
"2013-09-17 10:52:37.840 [AWT-EventQueue-0] DEBUG uk.co.netpacket.gui.Gui - IP Array[3]:30
"2013-09-17 10:52:37.842 [AWT-EventQueue-0] INFO  uk.co.netpacket.gui.Gui - AddTextToJTextFields called
"2013-09-17 10:52:37.842 [AWT-EventQueue-0] DEBUG uk.co.netpacket.gui.Gui - JText Field:null
"2013-09-17 10:52:43,261 DEBUG Shutting down RollingFileManager utils/Database.log
2013-09-17 10:52:43,262 DEBUG Shutting down RollingFileManager utils/Gui.log
2013-09-17 10:52:43,262 DEBUG Shutting down RollingFileManager utils/AppGeneral.log
2013-09-17 10:52:43,262 DEBUG Shutting down RollingFileManager utils/AXL.log
2013-09-17 10:52:43,262 DEBUG Shutting down OutputStreamManager SYSTEM_OUT

谢谢你的帮助,亚历克西斯

共有1个答案

易成天
2023-03-14

根据跟踪输出,我怀疑这是由PluginManager中的bug引起的(https://issues.apache.org/jira/browse/log4j2-393)。这个问题在今天晚些时候发布的beta-9中得到了修复。如果该问题仍然发生在beta-9,您可能已经发现了一个新的bug。在这种情况下,您可以在log4j2问题跟踪器中提出罚单吗?

 类似资料:
  • 我遇到的大多数集成都使用java-agent将跟踪推送到中央收集器,然后可以在Jaeger中查看跟踪。但是在我的例子中,我不能使用java代理,因此我决定使用自定义跟踪api,这似乎很好,并且有很多这样的例子。 通过设计,我的低延迟应用程序限制了我与外部组件/端口的任何连接,因此我也试图避免将跟踪/跨距推送到本地Jaeger代理或收集器endpoint,而是通过LogReporter记录跟踪。 除

  • 问题内容: 我倾向于将Hibernate与Spring框架结合使用,它具有声明式事务划分功能(例如@Transactional)。 众所周知,hibernate试图尽可能做到 非侵入性 和 透明性 ,但是事实证明,在使用关系时这 更具挑战性 。 我看到了许多具有不同透明度的设计方案。 使关系不延迟加载(例如, 这违反了整个延迟加载的想法。 使用初始化初始化集合 这意味着与DAO的耦合较高 尽管我们

  • 描述 我有一个小应用程序,它使用hook更新状态,但每次更新时,都会导致页面延迟。我指的是实际的延迟,而不仅仅是“等待异步”延迟。 我的理论是,更新状态会重新呈现太多的组件,因为如果我将状态减少到更少的值,滞后就会消失。 从本质上说,我担心我更新状态的方式没有隔离我想要的值。 密码 我将回购加载到CodeSandbox:https://codesandbox.io/s/long-forest-y9

  • 我有以下实体结构: 因此,我在每个实体类的顶部定义了以下命名实体图,这样我就可以优化我的查询,以确定我需要走多远: 路线: 停止: 孩子: 联系人: 我在我的仓库类中使用它们: 然而,我看不到正在进行任何连接查询,当我试图访问stops的子级时,会抛出一个lazyinit异常。我的理解是,这就是如何使用实体图来优化查询(例如,当我必须为每个单独的站点取子对象时,n 1问题),但我没有运气让它工作。

  • 问题内容: 我正在尝试使用新的React Lazy和Suspense创建后备加载组件。这很好用,但后备时间仅显示几毫秒。有没有办法增加额外的延迟或最短时间,因此我可以在渲染下一个组件之前显示该组件的动画? 现在懒导入 等待组件: 我可以做这样的事情吗? 问题答案: 函数应该返回对象的承诺,该对象由具有默认导出功能的模块返回。不会返回承诺,也不能那样使用。尽管任意承诺可以: 如果目标是提供 最小的

  • 问题内容: 我想知道如何在Java中的Swing应用程序中添加时间延迟,我使用,并且我也使用了SwingWorker,但是它不起作用。这是我的代码的一部分: 我希望您在使用SwingWorker时能帮助我或解决我的疑问。 问题答案: 这是一个使用