mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-05-14 10:15:55 +00:00

# Description This pull request includes several changes aimed at improving the code structure and removing redundant code. The most significant changes involve reordering methods, removing unnecessary annotations, and refactoring constructors to use dependency injection. Autowired now comes via constructor (which also doesn't need autowired annotation as its done by default for configuration) ## Checklist - [ ] I have read the [Contribution Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md) - [ ] I have performed a self-review of my own code - [ ] I have attached images of the change if it is UI based - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] If my code has heavily changed functionality I have updated relevant docs on [Stirling-PDFs doc repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/) - [ ] My changes generate no new warnings - [ ] I have read the section [Add New Translation Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md#add-new-translation-tags) (for new translation tags only)
53 lines
1.8 KiB
XML
53 lines
1.8 KiB
XML
<configuration>
|
|
|
|
<!-- Console Appender -->
|
|
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
|
<encoder>
|
|
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
|
|
</encoder>
|
|
</appender>
|
|
|
|
<!-- Rolling File Appender -->
|
|
<appender name="AUTHLOG" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
<file>logs/invalid-auths.log</file>
|
|
<encoder>
|
|
<pattern>%d %p %c{1} [%thread] %m%n</pattern>
|
|
</encoder>
|
|
|
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
<!-- daily rollover and keep 7 days' worth of history -->
|
|
<fileNamePattern>logs/auth-%d{yyyy-MM-dd}.log</fileNamePattern>
|
|
<maxHistory>1</maxHistory>
|
|
</rollingPolicy>
|
|
</appender>
|
|
|
|
<!-- Rolling File Appender -->
|
|
<appender name="GENERAL" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
<file>logs/info.log</file>
|
|
<encoder>
|
|
<pattern>%d %p %c{1} [%thread] %m%n</pattern>
|
|
</encoder>
|
|
|
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
<!-- daily rollover and keep 7 days' worth of history -->
|
|
<fileNamePattern>logs/info-%d{yyyy-MM-dd}.log</fileNamePattern>
|
|
<maxHistory>1</maxHistory>
|
|
</rollingPolicy>
|
|
</appender>
|
|
|
|
|
|
<!-- Root Logger -->
|
|
<root level="INFO">
|
|
<appender-ref ref="CONSOLE"/>
|
|
<appender-ref ref="GENERAL"/>
|
|
</root>
|
|
|
|
<!-- Specific Logger -->
|
|
<logger name="stirling.software.SPDF.config.security.CustomAuthenticationFailureHandler" level="ERROR"
|
|
additivity="false">
|
|
<appender-ref ref="CONSOLE"/>
|
|
<appender-ref ref="AUTHLOG"/>
|
|
</logger>
|
|
|
|
</configuration>
|