Skip to Content.
Sympa Menu

notify-dpml - r1255 - in trunk/main: depot/core/src/main/net/dpml/depot station/console/src/main/net/dpml/station/console

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: r1255 - in trunk/main: depot/core/src/main/net/dpml/depot station/console/src/main/net/dpml/station/console
  • Date: Thu, 23 Mar 2006 20:54:32 +0100

Author: mcconnell
Date: 2006-03-23 20:53:17 +0100 (Thu, 23 Mar 2006)
New Revision: 1255

Modified:
trunk/main/depot/core/src/main/net/dpml/depot/Main.java

trunk/main/station/console/src/main/net/dpml/station/console/StationPlugin.java
Log:
update the station console plugin to propergate the debug logging flag across
to the setup of the station server is is launching - and include more
debugging information concerning the received command set within the depot
console handler

Modified: trunk/main/depot/core/src/main/net/dpml/depot/Main.java
===================================================================
--- trunk/main/depot/core/src/main/net/dpml/depot/Main.java 2006-03-22
21:42:36 UTC (rev 1254)
+++ trunk/main/depot/core/src/main/net/dpml/depot/Main.java 2006-03-23
19:53:17 UTC (rev 1255)
@@ -23,6 +23,7 @@
import java.rmi.RMISecurityManager;
import java.io.File;
import java.util.ArrayList;
+import java.util.Date;
import java.util.Enumeration;

import net.dpml.transit.Disposable;
@@ -160,7 +161,7 @@
new File( Transit.DPML_DATA, "logs/station" ).mkdirs();
if( CLIHelper.isOptionPresent( arguments, "-server" ) )
{
- String name = "station (server mode)";
+ String name = "station.server";
String[] args = CLIHelper.consolidate( arguments, "-server" );
args = processSystemProperties( args );
String spec = "@DEPOT-STATION-SERVER-URI@";
@@ -168,7 +169,7 @@
}
else
{
- String name = "station (console mode)";
+ String name = "station.console";
String spec = "@DEPOT-STATION-URI@";
handlePlugin( name, spec, arguments, false );
}
@@ -198,17 +199,13 @@
private boolean deployHandler(
TransitModel model, String command, String path, String[] args,
boolean waitFor )
{
-
Logger logger = getLogger();
- if( m_debug )
+ if( logger.isDebugEnabled() )
{
- Enumeration names = System.getProperties().propertyNames();
- StringBuffer buffer = new StringBuffer( "System property
listing:" );
- while( names.hasMoreElements() )
- {
- String name = (String) names.nextElement();
- buffer.append( name + "=" + System.getProperty( name ) );
- }
+ logger.debug( "date: " + new Date() );
+ logger.debug( "system: " + command );
+ logger.debug( "uri: " + path );
+ logger.debug( "args: [" + toString( args ) + "]" );
}
try
{
@@ -219,7 +216,12 @@
m_plugin =
repository.getPlugin(
ClassLoader.getSystemClassLoader(),
- uri, new Object[]{model, args, logger} );
+ uri,
+ new Object[]
+ {
+ model, args, new LoggingAdapter( command )
+ }
+ );
}
catch( RepositoryException e )
{
@@ -333,10 +335,20 @@
return m_LOGGER;
}

-
//--------------------------------------------------------------------------
- // static utilities for setup of logging manager and root prefs
-
//--------------------------------------------------------------------------
-
+ private String toString( String[] args )
+ {
+ StringBuffer buffer = new StringBuffer();
+ for( int i=0; i<args.length; i++ )
+ {
+ if( i > 0 )
+ {
+ buffer.append( ", " );
+ }
+ buffer.append( args[i] );
+ }
+ return buffer.toString();
+ }
+
private String[] processSystemProperties( String[] args )
{
ArrayList result = new ArrayList();
@@ -358,6 +370,10 @@
return (String[]) result.toArray( new String[0] );
}

+
//--------------------------------------------------------------------------
+ // static utilities for setup of logging manager and root prefs
+
//--------------------------------------------------------------------------
+
/**
* Setup the monitors.
*/

Modified:
trunk/main/station/console/src/main/net/dpml/station/console/StationPlugin.java
===================================================================
---
trunk/main/station/console/src/main/net/dpml/station/console/StationPlugin.java
2006-03-22 21:42:36 UTC (rev 1254)
+++
trunk/main/station/console/src/main/net/dpml/station/console/StationPlugin.java
2006-03-23 19:53:17 UTC (rev 1255)
@@ -465,6 +465,12 @@

list.add(
"-Ddpml.logging.config=local:properties:dpml/station/logging" );
list.add( "-Ddpml.subprocess=true" );
+
+ if( getLogger().isDebugEnabled() )
+ {
+ list.add( "-D.level=FINE" );
+ }
+
Set propertyValue = line.getProperties();
Iterator iterator = propertyValue.iterator();
while( iterator.hasNext() )




  • r1255 - in trunk/main: depot/core/src/main/net/dpml/depot station/console/src/main/net/dpml/station/console, mcconnell at BerliOS, 03/23/2006

Archive powered by MHonArc 2.6.24.

Top of Page