client: fix logback config to log messages from threads
This removes the sifting appender which I think is unnecessary.
This commit is contained in:
@@ -67,7 +67,6 @@ import net.runelite.client.ui.overlay.infobox.InfoBoxOverlay;
|
||||
import net.runelite.client.ui.overlay.tooltip.TooltipOverlay;
|
||||
import net.runelite.client.ui.overlay.worldmap.WorldMapOverlay;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.slf4j.MDC;
|
||||
|
||||
@Singleton
|
||||
@Slf4j
|
||||
@@ -76,8 +75,6 @@ public class RuneLite
|
||||
public static final File RUNELITE_DIR = new File(System.getProperty("user.home"), ".runelite");
|
||||
public static final File PROFILES_DIR = new File(RUNELITE_DIR, "profiles");
|
||||
public static final File SCREENSHOT_DIR = new File(RUNELITE_DIR, "screenshots");
|
||||
private static final File LOGS_DIR = new File(RUNELITE_DIR, "logs");
|
||||
private static final File LOGS_FILE_NAME = new File(LOGS_DIR, "application");
|
||||
|
||||
@Getter
|
||||
private static Injector injector;
|
||||
@@ -194,9 +191,6 @@ public class RuneLite
|
||||
|
||||
PROFILES_DIR.mkdirs();
|
||||
|
||||
// Setup logger
|
||||
MDC.put("logFileName", LOGS_FILE_NAME.getAbsolutePath());
|
||||
|
||||
if (options.has("debug"))
|
||||
{
|
||||
final Logger logger = (Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
|
||||
|
||||
@@ -30,39 +30,29 @@
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<appender name="FILE" class="ch.qos.logback.classic.sift.SiftingAppender">
|
||||
<!-- discriminator is used for setting up the log file from code -->
|
||||
<discriminator>
|
||||
<key>logFileName</key>
|
||||
<defaultValue>${user.home}/.runelite/logs/application</defaultValue>
|
||||
</discriminator>
|
||||
<sift>
|
||||
<appender name="FILE-${logFileName}" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<!-- default file to log to -->
|
||||
<file>${logFileName}.log</file>
|
||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${user.home}/.runelite/logs/client.log</file>
|
||||
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- daily rollover -->
|
||||
<fileNamePattern>${logFileName}_%d{yyyy-MM-dd}.%i.log</fileNamePattern>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- daily rollover -->
|
||||
<fileNamePattern>client_%d{yyyy-MM-dd}.%i.log</fileNamePattern>
|
||||
|
||||
<!-- when file size is larger than defined, roll to new file -->
|
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<maxFileSize>10MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
<!-- when file size is larger than defined, roll to new file -->
|
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<maxFileSize>10MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
|
||||
<!-- keep 30 days' worth of history -->
|
||||
<maxHistory>30</maxHistory>
|
||||
</rollingPolicy>
|
||||
<!-- keep 30 days' worth of history -->
|
||||
<maxHistory>30</maxHistory>
|
||||
</rollingPolicy>
|
||||
|
||||
<encoder>
|
||||
<Pattern>%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n</Pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
</sift>
|
||||
<encoder>
|
||||
<Pattern>%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n</Pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<root level="INFO">
|
||||
<appender-ref ref="STDOUT" />
|
||||
<appender-ref ref="STDOUT"/>
|
||||
<appender-ref ref="FILE"/>
|
||||
</root>
|
||||
</configuration>
|
||||
Reference in New Issue
Block a user