You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by ni...@apache.org on 2006/02/14 03:36:07 UTC
svn commit: r377584 -
/struts/action/trunk/src/java/org/apache/struts/chain/commands/ActionCommandBase.java
Author: niallp
Date: Mon Feb 13 18:36:06 2006
New Revision: 377584
URL: http://svn.apache.org/viewcvs?rev=377584&view=rev
Log:
Log each command's execution, for debug purposes.
Modified:
struts/action/trunk/src/java/org/apache/struts/chain/commands/ActionCommandBase.java
Modified: struts/action/trunk/src/java/org/apache/struts/chain/commands/ActionCommandBase.java
URL: http://svn.apache.org/viewcvs/struts/action/trunk/src/java/org/apache/struts/chain/commands/ActionCommandBase.java?rev=377584&r1=377583&r2=377584&view=diff
==============================================================================
--- struts/action/trunk/src/java/org/apache/struts/chain/commands/ActionCommandBase.java (original)
+++ struts/action/trunk/src/java/org/apache/struts/chain/commands/ActionCommandBase.java Mon Feb 13 18:36:06 2006
@@ -1,7 +1,7 @@
/*
* $Id$
*
- * Copyright 2005 The Apache Software Foundation.
+ * Copyright 2005-2006 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +17,8 @@
*/
package org.apache.struts.chain.commands;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.apache.commons.chain.Context;
import org.apache.struts.chain.contexts.ActionContext;
@@ -26,6 +28,13 @@
* that class.</p>
*/
public abstract class ActionCommandBase implements ActionCommand {
+
+ /**
+ * <p> Provide Commons Logging instance for this class. </p>
+ */
+ private static final Log LOG =
+ LogFactory.getLog(ActionCommandBase.class);
+
// See interface for Javadoc
public abstract boolean execute(ActionContext actionContext)
throws Exception;
@@ -33,6 +42,9 @@
// See interface for Javadoc
public boolean execute(Context context)
throws Exception {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Executing " + getClass().getName());
+ }
return execute((ActionContext) context);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org