public Logger getLogger() { return super.getLogger(); }
public Logger getLogger() { return super.getLogger(); } }
public Logger getLogger() { return super.getLogger(); }
public void initialize() throws InitializationException { deployments = new HashMap(); applicationListeners = new ArrayList(); getLogger().info( "Applications will be deployed in: '" + applicationsDirectory + "'." ); }
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 + "'." ); } }
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 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 disconnect() { try { if ( input != null ) { input.close(); } if ( output != null ) { output.close(); } } catch ( IOException e ) { getLogger().error( "Error disconnecting from IRC server", e ); } }
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(); }
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 ); }
/** * 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; }
public void dispose() { List names = new ArrayList( deployments.keySet() ); for ( Iterator it = names.iterator(); it.hasNext(); ) { String name = (String) it.next(); try { undeploy( name ); } catch( Exception e ) { getLogger().warn( "Error while undeploying application '" + name + "'.", e ); } } } }
@Override protected Logger getLogger() { Logger logger = super.getLogger(); if ( logger == null ) { logger = new ConsoleLogger( Logger.LEVEL_INFO, "assemblyReader-internal" ); enableLogging( logger ); } return logger; }
public void logoff() { if ( output == null ) { return; } BufferedWriter bw = output; try { if ( !ircsend( "quit terminating" ) ) ; bw.write( "quit terminating" ); bw.newLine(); bw.flush(); } catch ( Exception e ) { getLogger().error( "logoff error: ", e ); } }
protected boolean enabled( String level ) { Logger logger = getLogger(); if ( CommonLogLevels.DEBUG.equals( level ) ) { return logger.isDebugEnabled(); } else if ( CommonLogLevels.ERROR.equals( level ) ) { return logger.isErrorEnabled(); } else if ( CommonLogLevels.INFO.equals( level ) ) { return logger.isInfoEnabled(); } else if ( CommonLogLevels.WARN.equals( level ) ) { return logger.isWarnEnabled(); } else { // if it doesn't match one of these, then I guess we'll let it through on INFO. return logger.isInfoEnabled(); } }
public void dispose() { if ( cacheManager.getStatus().equals( Status.STATUS_ALIVE ) ) { getLogger().info( "Disposing cache: " + cache ); if ( this.cache != null ) { cacheManager.removeCache( this.cache.getName() ); cache = null; } } else { getLogger().debug( "Not disposing cache, because cacheManager is not alive: " + cache ); } } }
public void login() throws MsnException { msn = new MSNMessenger( login, password ); msn.setInitialStatus( initialStatus ); LoginAdapter adapter = new LoginAdapter( msn, getLogger() ); msn.addMsnListener( adapter ); msn.login(); getLogger().info( "Connection. Waiting for the response...." ); while ( adapter.getStatus() == LoginAdapter.NOT_INITIALIZED ) { try { Thread.sleep( 1000 ); } catch ( InterruptedException e ) { } } if ( adapter.getStatus() == LoginAdapter.LOGIN_ERROR ) { throw new MsnException( "Login failed : " + adapter.getError() ); } }