- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
public final class TimeBasedRollingPolicy extends RollingPolicyBase
...
private int suffixLength = 0;
...
public void activateOptions() {
....
if (lastFileName.endsWith(".gz")) {
suffixLength = 3;
} else if (lastFileName.endsWith(".zip")) {
suffixLength = 4;
}
}
public RolloverDescription rollover(final String currentActiveFile) {
...
if (suffixLength == 3) {
compressAction =
new GZCompressAction(
new File(lastBaseName), new File(lastFileName), true);
}
if (suffixLength == 4) {
compressAction =
new ZipCompressAction(
new File(lastBaseName), new File(lastFileName), true);
}
...
}
}
guest 11.07.2014 19:20 # +3
Qwertiy 12.07.2014 02:36 # 0
pingw33n 14.07.2014 17:32 # 0
kegdan 14.07.2014 17:59 # 0
bormand 14.07.2014 18:05 # +1
Captain_Obvious 14.07.2014 18:08 # 0
bormand 14.07.2014 18:10 # 0
kegdan 14.07.2014 18:12 # 0
Captain_Obvious 14.07.2014 18:13 # 0
kegdan 14.07.2014 18:17 # 0
1024-- 14.07.2014 19:34 # 0
kegdan 14.07.2014 20:27 # 0
anonimb84a2f6fd141 14.07.2014 20:36 # −17
Нагибайся...
anonimb84a2f6fd141 14.07.2014 21:14 # −21
falsting 12.07.2014 03:15 # 0
absolut 12.07.2014 17:37 # 0
roman-kashitsyn 17.07.2014 10:33 # 0