* Log Jetty messages to Helma logger.
This commit is contained in:
parent
b2a6acdf97
commit
b4276f683b
1 changed files with 8 additions and 7 deletions
|
@ -17,7 +17,6 @@
|
||||||
package helma.main;
|
package helma.main;
|
||||||
|
|
||||||
import helma.extensions.HelmaExtension;
|
import helma.extensions.HelmaExtension;
|
||||||
import helma.framework.*;
|
|
||||||
import helma.framework.repository.FileResource;
|
import helma.framework.repository.FileResource;
|
||||||
import helma.framework.core.*;
|
import helma.framework.core.*;
|
||||||
import helma.objectmodel.db.DbSource;
|
import helma.objectmodel.db.DbSource;
|
||||||
|
@ -568,10 +567,7 @@ public class Server implements Runnable {
|
||||||
try {
|
try {
|
||||||
if ((websrvPort != null) || (ajp13Port != null)) {
|
if ((websrvPort != null) || (ajp13Port != null)) {
|
||||||
http = new HttpServer();
|
http = new HttpServer();
|
||||||
|
// plug helma server logger into Jetty
|
||||||
// disable Jetty logging FIXME: seems to be a jetty bug; as soon
|
|
||||||
// as the logging is disabled, the more is logged
|
|
||||||
org.mortbay.util.Log.instance().disableLog();
|
|
||||||
org.mortbay.util.Log.instance().add(new HelmaLogSink());
|
org.mortbay.util.Log.instance().add(new HelmaLogSink());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -891,16 +887,21 @@ public class Server implements Runnable {
|
||||||
appManager.stop(name);
|
appManager.stop(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
static class HelmaLogSink implements LogSink {
|
/**
|
||||||
|
* Adapter class to use Helma Logging as Jetty LogSkin
|
||||||
|
*/
|
||||||
|
class HelmaLogSink implements LogSink {
|
||||||
|
|
||||||
public String getOptions() {
|
public String getOptions() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void log(String formattedLog) {
|
public void log(String formattedLog) {
|
||||||
|
getLogger().info(formattedLog);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void log(String tag, Object msg, Frame frame, long time) {
|
public void log(String tag, Object msg, Frame frame, long time) {
|
||||||
|
getLogger().info(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setOptions(String options) {
|
public void setOptions(String options) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue