package org.webdsl.logging;

public class Logger {
    private static final org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(org.webdsl.logging.Logger.class);

    public static final void info(Object message){
        logger.info(message);
    }

    public static final void warn(Object message){
        logger.warn("WARN  " + message);
    }

    public static final void debug(Object message){
        logger.debug(message);
    }

    public static final void error(Object message, Throwable t){
        logger.error("ERROR " + message, t);
    }

    public static final void error(Object message){
        logger.error("ERROR " + message);
    }

    public static final void error(Throwable t){
        logger.error("ERROR ", t);
    }

    public static final void trace(Object message){
        logger.trace(message);
    }

    public static final void fatal(Object message){
        logger.fatal(message);
    }

    public static final void fatal(Object message, Throwable t){
        logger.error("FATAL " + message, t);
    }

    public static final void fatal(Throwable t){
        logger.error("FATAL ", t);
    }
}

@@ -22,16 +22,141 @@
 gging;%0A%0A
+import javax.servlet.http.HttpServletRequest;%0A%0Aimport utils.AbstractDispatchServletHelper;%0Aimport utils.ThreadLocalServlet;%0A%0A
 public c
@@ -651,32 +651,46 @@
    logger.error(
+ addURLSuffix(
 %22ERROR %22 + messa
@@ -683,32 +683,33 @@
 RROR %22 + message
+)
 , t);%0A    %7D%0A%0A   
@@ -770,32 +770,46 @@
    logger.error(
+ addURLSuffix(
 %22ERROR %22 + messa
@@ -803,32 +803,34 @@
 ROR %22 + message)
+ )
 ;%0A    %7D%0A%0A    pub
@@ -892,24 +892,38 @@
 r.error(
+ addURLSuffix(
 %22ERROR %22
 , t);%0A  
@@ -914,16 +914,17 @@
 %22ERROR %22
+)
 , t);%0A  
@@ -1091,23 +1091,52 @@
 r.fatal(
-message
+ addURLSuffix( message.toString() ) 
 );%0A    %7D
@@ -1215,32 +1215,46 @@
    logger.error(
+ addURLSuffix(
 %22FATAL %22 + messa
@@ -1255,16 +1255,17 @@
  message
+)
 , t);%0A  
@@ -1339,24 +1339,38 @@
 r.error(
+ addURLSuffix(
 %22FATAL %22
 , t);%0A  
@@ -1361,16 +1361,17 @@
 %22FATAL %22
+)
 , t);%0A  
@@ -1374,10 +1374,362 @@
 ;%0A    %7D%0A
+    %0A    private static String addURLSuffix( String msg ) %7B%0A      AbstractDispatchServletHelper dsh = ThreadLocalServlet.get();%0A      if(dsh != null) %7B%0A        HttpServletRequest req = dsh.getRequest();%0A        if(req != null) %7B%0A          return msg + %22 %5B%22 + req.getRequestURL().toString() + %22%5D%22;%0A        %7D%0A      %7D%0A      //else%0A      return msg;%0A    %7D%0A
 %7D%0A

Add URL to log messages of type ERROR and FATAL