Fixes bug 210, http://helma.org/bugs/show_bug.cgi?id=210
This commit is contained in:
parent
712cba2d99
commit
585db17d22
3 changed files with 18 additions and 11 deletions
|
@ -62,7 +62,7 @@ public class ResponseBean implements Serializable {
|
|||
res.writeBinary (what);
|
||||
}
|
||||
|
||||
public void debug (String message) {
|
||||
public void debug (Object message) {
|
||||
res.debug (message);
|
||||
}
|
||||
|
||||
|
|
|
@ -237,10 +237,13 @@ public final class ResponseTrans implements Externalizable {
|
|||
* that buffer exists and its length is larger than offset. str may be null, in which
|
||||
* case nothing happens.
|
||||
*/
|
||||
public void debug (String str) {
|
||||
public void debug (Object message) {
|
||||
if (debugBuffer == null)
|
||||
debugBuffer = new StringBuffer ();
|
||||
debugBuffer.append ("<p><span style=\"background: yellow; color: black\">"+str+"</span></p>");
|
||||
String str = message == null ? "null" : message.toString ();
|
||||
debugBuffer.append ("<p><span style=\"background: yellow; color: black\">");
|
||||
debugBuffer.append (str);
|
||||
debugBuffer.append ("</span></p>");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -24,23 +24,27 @@ public class ApplicationBean implements Serializable {
|
|||
app.clearCache ();
|
||||
}
|
||||
|
||||
public void log (String msg) {
|
||||
app.logEvent (msg);
|
||||
public void log (Object msg) {
|
||||
String str = msg == null ? "null" : msg.toString();
|
||||
app.logEvent (str);
|
||||
}
|
||||
|
||||
public void log (String logname, String msg) {
|
||||
app.getLogger (logname).log (msg);
|
||||
public void log (String logname, Object msg) {
|
||||
String str = msg == null ? "null" : msg.toString();
|
||||
app.getLogger (logname).log (str);
|
||||
}
|
||||
|
||||
public void debug (String msg) {
|
||||
public void debug (Object msg) {
|
||||
if (app.debug()) {
|
||||
app.logEvent (msg);
|
||||
String str = msg == null ? "null" : msg.toString();
|
||||
app.logEvent (str);
|
||||
}
|
||||
}
|
||||
|
||||
public void debug (String logname, String msg) {
|
||||
public void debug (String logname, Object msg) {
|
||||
if (app.debug()) {
|
||||
app.getLogger (logname).log (msg);
|
||||
String str = msg == null ? "null" : msg.toString();
|
||||
app.getLogger (logname).log (str);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue