public Logger getLogger() { return super.getLogger(); }
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 ); }
public Logger getLogger() { return super.getLogger(); } }
protected final void setupLogger( final Object component ) { setupLogger( component, logger ); }
public Logger getLogger() { return super.getLogger(); }
protected void setupLogger( Object component ) { setupLogger( component, logger ); }
public void initialize() throws InitializationException { deployments = new HashMap(); applicationListeners = new ArrayList(); getLogger().info( "Applications will be deployed in: '" + applicationsDirectory + "'." ); }
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 ); }
private void findExtraParameters( String tagName, Map parameters ) { for ( Iterator it = parameters.keySet().iterator(); it.hasNext(); ) { String s = (String) it.next(); getLogger().warn( "Extra parameter on the '" + tagName + "' tag: '" + s + "'." ); } }
protected final void setupLogger( final Object component, final String category ) { if ( category == null ) { throw new IllegalStateException( "Logging category must be defined." ); } setupLogger( component, logger.getChildLogger( category ) ); }
public void dispose() { try { consoleReader.close(); } catch ( IOException e ) { getLogger().error( "Error closing input stream must be ignored", e ); } } }
public void initialize() throws InitializationException { getLogger().info( "Services will be deployed in: '" + serviceDirectory + "'." ); }
protected Logger getLogger() { if ( logger == null ) { // Try to use parent logger first. logger = super.getLogger(); if ( logger == null ) { // whoops no parent logger. logger = new ConsoleLogger( Logger.LEVEL_DEBUG, EnvironmentCheck.class.getName() ); } } return logger; }
public void disconnect() { try { if ( input != null ) { input.close(); } if ( output != null ) { output.close(); } } catch ( IOException e ) { getLogger().error( "Error disconnecting from IRC server", e ); } }
public boolean ircsend( String message ) { if ( output == null ) { return false; } getLogger().info( "irc: '" + message + "'" ); try { output.write( message ); output.newLine(); output.flush(); } catch ( IOException e ) { return false; } return true; }
public void start() throws StartingException { getLogger().info( "Starting task executor, thread name '" + name + "'." ); executorRunnable = new ExecutorRunnable(); executorThread = new Thread( executorRunnable ); executorThread.setDaemon( true ); executorThread.start(); }
/** * Checks for a ping and replys with a pong * * @param msg java.lang.String the IRC message */ private boolean pingpong( String msg ) throws IOException { if ( msg.substring( 0, 4 ).equalsIgnoreCase( "ping" ) ) { // send a pong back String pongmsg = "pong " + msg.substring( 5 ); output.write( pongmsg ); output.newLine(); output.flush(); getLogger().debug( "ping pong" ); return true; } return false; }
protected void copyArtifact( Artifact artifact, File outputDir, File destination ) throws IOException { String dest = destination.getAbsolutePath().substring( outputDir.getAbsolutePath().length() + 1 ); getLogger().info( "Adding " + artifact.getId() + " to " + dest ); FileUtils.copyFileToDirectory( artifact.getFile(), destination ); }