package de.uhilger.avdirektor.handler;
|
|
import com.sun.net.httpserver.HttpExchange;
|
import de.uhilger.avdirektor.OMXLogLeser;
|
import java.io.File;
|
import java.io.IOException;
|
import java.util.logging.Level;
|
import java.util.logging.Logger;
|
|
/**
|
*
|
* @author ulrich
|
*/
|
public class LogHandler extends AbstractHandler {
|
|
private static final Logger logger = Logger.getLogger(LogHandler.class.getName());
|
|
@Override
|
protected String process(HttpExchange t, String params) {
|
OMXLogLeser leser = new OMXLogLeser();
|
String lines = "Log nicht lesbar.";
|
try {
|
lines = leser.lesen(new File("/home/ulrich/work/avd/omxplayer.log"));
|
} catch (IOException ex) {
|
Logger.getLogger(LogHandler.class.getName()).log(Level.SEVERE, null, ex);
|
}
|
return lines;
|
}
|
|
}
|