You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@continuum.apache.org by Trygve Laugstøl <tr...@apache.org> on 2006/07/15 16:28:17 UTC
Re: svn commit: r422021 - in /maven/continuum/trunk: ./ continuum-webapp/
continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ continuum-webapp/src/main/resources/
continuum-webapp/src/test/ continuum-webapp/src/test/java/ continuum-webapp...
evenisse@apache.org wrote:
> Author: evenisse
> Date: Fri Jul 14 13:24:49 2006
> New Revision: 422021
>
> URL: http://svn.apache.org/viewvc?rev=422021&view=rev
> Log:
> [CONTINUUM-759] Generate plexus-request.xml with plexus-cdc
> Submitted by: Jesse McConnell
>
> Added:
> maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AbstractContinuumAction.java (with props)
Why is this in Continuum and not in plexus-xwork?
[snip]
> Added: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AbstractContinuumAction.java
> URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AbstractContinuumAction.java?rev=422021&view=auto
> ==============================================================================
> --- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AbstractContinuumAction.java (added)
> +++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AbstractContinuumAction.java Fri Jul 14 13:24:49 2006
> @@ -0,0 +1,71 @@
> +package org.apache.maven.continuum.web.action;
> +
> +/*
> + * Copyright 2001-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.
> + * You may obtain a copy of the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing, software
> + * distributed under the License is distributed on an "AS IS" BASIS,
> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> + * See the License for the specific language governing permissions and
> + * limitations under the License.
> + */
> +
> +import org.codehaus.plexus.logging.LogEnabled;
> +import org.codehaus.plexus.logging.Logger;
> +import com.opensymphony.xwork.ActionSupport;
> +
> +/**
> + * AbstractContinuumAction:
> + *
> + * @author: jesse
> + * @date: Jul 13, 2006
> + * @version: $ID:$
> + */
> +public abstract class AbstractContinuumAction
> + extends ActionSupport
> + implements LogEnabled
> +{
> + private Logger logger;
> +
> + public void enableLogging( Logger logger )
> + {
> + this.logger = logger;
> + }
> +
> + protected Logger getLogger()
> + {
> + return logger;
> + }
> +
vvv
> + protected void setupLogger( Object component )
> + {
> + setupLogger( component, logger );
> + }
> +
> + protected void setupLogger( Object component, String subCategory )
> + {
> + if ( subCategory == null )
> + {
> + throw new IllegalStateException( "Logging category must be defined." );
> + }
> +
> + Logger logger = this.logger.getChildLogger( subCategory );
> +
> + setupLogger( component, logger );
> + }
> +
> + protected void setupLogger( Object component, Logger logger )
> + {
> + if ( component instanceof LogEnabled )
> + {
> + ( (LogEnabled) component ).enableLogging( logger );
> + }
> + }
^^^ what is this stuff used for? The container is handling the logging
configuration of the components.
[snip]
--
Trygve