private MucRoom getRoom( final MucService service, final Stanza message ) throws MessageException { final JID jid = message.getTo(); final MucRoom room = service.getRoomSet().get( jid.getNode() ); if( room == null ) { if( log.isDebugEnabled() ) { log.debug( "Room %s not found", jid ); } } else if( log.isDebugEnabled() ) { log.debug( "Room %s found", jid ); } return room; }
protected final void error( final String msg, final Object... args ) { if( log != null ) { log.error( msg, args ); } }
private void notice( final String msg, final Object... args ) { if( log != null ) { log.info( msg, args ); } }
@Override public void run() if( log.isDebugEnabled() ) log.debug( "starting ReferenceQueue" ); if( log.isDebugEnabled() ) log.debug( "dequeued reference %s", ref.toString() ); log.warn( "A reference not a subclass of CleanableWeakReference has been added to the Utilities.activeReferenceQueue(): %s", // NOI18N ref.getClass() ); if( log.isDebugEnabled() ) log.debug( "ReferenceQueue ThreadDeath", td ); log.fatal( "Throwable that should not happen has happened, please repoort it as a bug", t ); if( log.isDebugEnabled() ) log.debug( "ReferenceQueue InterruptedException", ex );
getLog().debug( "Registering selector on serverChannel" ); serverChannel.register( selector, SelectionKey.OP_ACCEPT ); getLog().error( "Failed to register selector", ex ); return; getLog().info( "SocketProcessor Thread %s started", Thread.currentThread().getName() ); getLog().error( "Exception during select() in Thread %s", ex, Thread.currentThread().getName() ); getLog().info( "SocketProcessor Thread %s stopped", Thread.currentThread().getName() );
throws MessageException if( serverLog.isDebugEnabled() ) serverLog.debug( "Sending\n%s", marshallXml( message ) ); serverLog.debug( "Sending %s", XMPPUtil.toString( message ) ); if( ec == null ) serverLog.fatal( "No ErrorCondition", xe ); throw xe; serverLog.error( "ErrorCondition.%s", xe, ec ); ec.respond( this, message );
contentTypes = new HashMap<ContentType, List<TemplateService>>(); getLog().info( "Registering TemplateService's" ); final Collection<Class<TemplateService>> classes = Service.providerClasses( TemplateService.class ); getLog().error( "Unable to instantiate TemplateService %s", ie, clazz ); getLog().error( "Unable to access TemplateService %s", iae, clazz ); getLog().info( "Registered %d Parser's, %d Renderer's from %d TemplateService's", parsers.size(),
@Override protected void initiate( final ResourceConfig rc, final WebApplication wa ) { try { // Add all classes discovered by the post processor to the ResourceConfig final Set<Class<?>> classes = Kernel.getInstance().<KernelComponentPostProcessor>getBean( PROCESSOR_BEAN ).getClasses(); log.debug( "Discovered %d provider/root classes", classes.size() ); rc.getClasses().addAll( classes ); log.debug( "%d provider/root classes in config", rc.getClasses().size() ); // Now initiate the WebApplication wa.initiate( rc, new KernelComponentProviderFactory() ); } catch( RuntimeException e ) { log.error( "Exception occurred when intialization", e ); throw e; } } }
@Override public void logMessage( final MucRoom room, final Message message ) { if( log.isInfoEnabled() ) { // FIXME figure out why this is needed @SuppressWarnings( "unchecked" ) final List<Body> body = message.getBody(); if( body.isEmpty() ) { log.info( "%s %s NO_BODY", message.getFrom(), room.getJid() ); } else { for( Body b : body ) { log.info( "%s %s %s", message.getFrom(), room.getJid(), b.getValue() ); } } } } };
@SuppressWarnings( "unchecked" ) public static final <T> XMPPLogic process( final Object data1, final Object data2, final XMPPLogic logic, final XMPPServer<T> server, final Iq<?, ?> iq ) throws MessageException { XMPPLogic l = logic; while( l != null ) { if( log.isDebugEnabled() ) { debug( l, iq ); } l = l.process( server, data1, data2, iq ); } return null; }
@Override public void uncaughtException( Thread t, Throwable e ) { log.fatal( "Uncaught exception on thread " + t, e ); } } );
protected final void warn( final String msg, final Object... args ) { if( log != null ) { log.warn( message, args ); } }
/** * {@inheritDoc} */ @Override public void logMessage( final MucRoom room, final Message message ) { if( getLog().isInfoEnabled() ) { // FIXME another unchecked cast to investigate @SuppressWarnings( "unchecked" ) final List<Body> body = message.getBody(); if( body.isEmpty() ) { getLog().info( "%s %s NO_BODY", message.getFrom(), room.getJid() ); } else { for( Body b : body ) { getLog().info( "%s %s %s", message.getFrom(), room.getJid(), b.getValue() ); } } } } }
@SuppressWarnings( "unchecked" ) public static final <T> XMPPLogic process( final Object data1, final Object data2, final XMPPLogic logic, final XMPPServer<T> server, final Message<?, ?> message ) throws MessageException { XMPPLogic l = logic; while( l != null ) { if( log.isDebugEnabled() ) { debug( l, message ); } l = l.process( server, data1, data2, message ); } return null; }
protected final void fatal( final String msg, final Object... args ) { if( log != null ) { log.fatal( msg, args ); } }
protected final void warn( final String msg, final Object... args ) { if( log != null ) { log.warn( msg, args ); } }
protected final void info( final String msg, final Object... args ) { if( log != null ) { log.info( message, args ); } }
if( log.isDebugEnabled() ) log.debug( "Creating ReferenceQueue" );