2 Commits

Author SHA1 Message Date
RatzzFatzz
d98c4cd49e Handle empty input 2025-02-04 17:57:34 +01:00
RatzzFatzz
21f244ff3f Update logging config 2025-02-04 17:48:45 +01:00
5 changed files with 37 additions and 11 deletions

View File

@@ -53,7 +53,7 @@ Windows (installed): `mkvaudiosubtitlechanger.jar --library "X:/Files" --attribu
```
If you need more information how each parameter works, check out [this wiki page](https://github.com/RatzzFatzz/MKVAudioSubtitleChanger/wiki/Parameters-v4).
All parameters can also be defined in a [config file](https://github.com/RatzzFatzz/MKVAudioSubtitleChanger/wiki/How-to-config-file).
All parameters can also be defined in a [config file](https://picocli.info/#_argument_files_for_long_command_lines).
## Build requirements
- JDK 21 or newer

View File

@@ -61,6 +61,9 @@ public class Main implements Runnable {
}
public static void main(String[] args) {
if (args.length == 0) {
args = new String[] { "--help" };
}
new CommandLine(Main.class).execute(args);
}
}

View File

@@ -10,7 +10,7 @@ Configuration:
RollingFile:
name: FileAppender
fileName: logs/application.log
filePattern: logs/archive/application-%d{yyyy-MM-dd}-%i.log
filePattern: logs/archive/application-%d{yyyy-MM-dd}-%i.log.gz
PatternLayout:
Pattern: "%d{DEFAULT} | %-5level | %thread | %msg %n %throwable"
ThresholdFilter:
@@ -18,6 +18,16 @@ Configuration:
Policies:
OnStartupTriggeringPolicy:
minSize: 0
DefaultRolloverStrategy:
max: 30
Delete:
basePath: logs/archive
maxDepth: 1
IfLastModified:
age: 30d
IfAccumulatedFileSize:
exceeds: 1GB
Loggers:
Root:
level: debug

View File

@@ -1,17 +1,10 @@
Configuration:
name: DefaultLogger
Appenders:
File:
name: FileAppender
fileName: ${sys:user.home}/AppData/Roaming/MyApplication/MyApplication.log
PatternLayout:
Pattern: "%d{DEFAULT} | %-5level | %thread | %msg %n %throwable"
ThresholdFilter:
level: info
RollingFile:
name: FileAppender
fileName: ${sys:user.home}/AppData/Roaming/MKVAudioSubtitleChanger/logs/application.log
filePattern: ${sys:user.home}/AppData/Roaming/MKVAudioSubtitleChanger/logs/archive/application-%d{yyyy-MM-dd}-%i.log
filePattern: ${sys:user.home}/AppData/Roaming/MKVAudioSubtitleChanger/logs/archive/application-%d{yyyy-MM-dd}-%i.log.gz
PatternLayout:
Pattern: "%d{DEFAULT} | %-5level | %thread | %msg %n %throwable"
ThresholdFilter:
@@ -19,6 +12,16 @@ Configuration:
Policies:
OnStartupTriggeringPolicy:
minSize: 0
DefaultRolloverStrategy:
max: 30
Delete:
basePath: logs/archive
maxDepth: 1
IfLastModified:
age: 30d
IfAccumulatedFileSize:
exceeds: 1GB
Loggers:
Root:
level: info

View File

@@ -4,7 +4,7 @@ Configuration:
RollingFile:
name: FileAppender
fileName: logs/application.log
filePattern: logs/archive/application-%d{yyyy-MM-dd}-%i.log
filePattern: logs/archive/application-%d{yyyy-MM-dd}-%i.log.gz
PatternLayout:
Pattern: "%d{DEFAULT} | %-5level | %thread | %msg %n %throwable"
ThresholdFilter:
@@ -12,6 +12,16 @@ Configuration:
Policies:
OnStartupTriggeringPolicy:
minSize: 0
DefaultRolloverStrategy:
max: 30
Delete:
basePath: logs/archive
maxDepth: 1
IfLastModified:
age: 30d
IfAccumulatedFileSize:
exceeds: 1GB
Loggers:
Root:
level: info