LoggerOutputStream.java
946 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* org.apache.commons.exec.LogOutputStream
* org.slf4j.Logger
*/
package com.day.cq.dam.handler.ffmpeg;
import com.day.cq.dam.handler.ffmpeg.FFMpegWrapper;
import org.apache.commons.exec.LogOutputStream;
import org.slf4j.Logger;
public class LoggerOutputStream
extends LogOutputStream {
private Logger log;
private FFMpegWrapper wrapper;
public void setWrapper(FFMpegWrapper wrapper) {
this.wrapper = wrapper;
}
public LoggerOutputStream(Logger log) {
this.log = log;
if (null == log) {
throw new IllegalArgumentException("logger may not be null");
}
}
protected void processLine(String line, int level) {
this.log.info("FFMPEG Exec: {}", (Object)line);
if (this.wrapper != null) {
this.wrapper.getFFMpegOutput().append(line).append("\n");
}
}
}