commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rahul Akolkar <rahul.akol...@gmail.com>
Subject Re: [JEXL] svn commit: r800447
Date Mon, 03 Aug 2009 20:41:25 GMT
On Mon, Aug 3, 2009 at 12:10 PM, <sebb@apache.org> wrote:
> Author: sebb
> Date: Mon Aug  3 16:10:25 2009
> New Revision: 800447
>
> URL: http://svn.apache.org/viewvc?rev=800447&view=rev
> Log:
> Give scripts access to a logger
>
> Modified:
>    commons/proper/jexl/branches/2.0/src/main/java/org/apache/commons/jexl/scripting/JexlScriptObject.java
>
> Modified: commons/proper/jexl/branches/2.0/src/main/java/org/apache/commons/jexl/scripting/JexlScriptObject.java
> URL: http://svn.apache.org/viewvc/commons/proper/jexl/branches/2.0/src/main/java/org/apache/commons/jexl/scripting/JexlScriptObject.java?rev=800447&r1=800446&r2=800447&view=diff
> ==============================================================================
> --- commons/proper/jexl/branches/2.0/src/main/java/org/apache/commons/jexl/scripting/JexlScriptObject.java
(original)
> +++ commons/proper/jexl/branches/2.0/src/main/java/org/apache/commons/jexl/scripting/JexlScriptObject.java
Mon Aug  3 16:10:25 2009
> @@ -19,6 +19,9 @@
>
>  import java.io.PrintStream;
>
> +import org.apache.commons.logging.Log;
> +import org.apache.commons.logging.LogFactory;
> +
>  /**
>  * Implements variables and methods for use by JEXL scripts.
>  * <p>
> @@ -26,6 +29,7 @@
>  * <ul>
>  * <li>out - System.out</li>
>  * <li>err - System.err</li>
> + * <li>logger - a logger</li>
>  * <li>System - System.class</li>
>  * <li></li>
>  * </ul>
> @@ -66,4 +70,7 @@
>         return System.class;
>     }
>
> +    public static Log getLogger(){
> +        return LogFactory.getLog(JexlScriptEngine.class); // TODO is this the correct
class?
> +    }
<snip/>

Yes, I think thats a good choice. Suggest documenting in the method Javadoc?

-Rahul

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message