本文整理了Java中uk.org.retep.logging.Log.info()
方法的一些代码示例,展示了Log.info()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Log.info()
方法的具体详情如下:
包路径:uk.org.retep.logging.Log
类名称:Log
方法名:info
暂无
代码示例来源:origin: uk.org.retep.tools/io
private void notice( final String msg, final Object... args )
{
if( log != null )
{
log.info( msg, args );
}
}
代码示例来源:origin: uk.org.retep.tools/io
protected final void info( final String msg, final Object... args )
{
if( log != null )
{
log.info( message, args );
}
}
代码示例来源:origin: uk.org.retep.tools/io
protected final void info( final String msg, final Object... args )
{
if( log != null )
{
log.info( msg, args );
}
}
代码示例来源:origin: uk.org.retep.tools/io
/**
* Identical to File.mkdir() but will log if the logger is not null
* @param dir Directory to make
* @param log Log to use if not null
* @return dir
*/
public static File mkdirs( final File dir, final Log log )
{
if( dir != null && dir.mkdirs() && log != null )
{
log.info( "Created %s", dir.getPath() );
}
return dir;
}
代码示例来源:origin: uk.org.retep.tools/io
/**
* Identical to File.mkdir() but will log if the logger is not null
* @param dir Directory to make
* @param log Log to use if not null
* @return dir
*/
public static File mkdir( final File dir, final Log log )
{
if( dir.mkdir() && log != null )
{
log.info( "Created %s", dir.getPath() );
}
return dir;
}
代码示例来源:origin: uk.org.retep.tools/httpd
public StaticFileHandler( final File rootDirectory )
{
this.rootDirectory = rootDirectory;
getLog().info( "Created StaticHandler for %s",
rootDirectory.getAbsolutePath() );
}
代码示例来源:origin: uk.org.retep.tools/io
/**
* Delete a File. This is the same as {@link File#delete()} except that
* this method will delete all content if it's a directory
*
* @param file File to delete
* @param log Log to log progress to, null for no logging
* @return true only if the file was really deleted
*/
public static boolean delete( @Nonnull final File file,
@Nullable final Log log )
{
if( file.exists() && file.isDirectory() )
{
for( File child : file.listFiles() )
{
delete( child, log );
}
}
if( log != null )
{
log.info( "Deleting %s", file.getAbsolutePath() );
}
return file.delete();
}
}
代码示例来源:origin: uk.org.retep.microkernel.web/jersey
/**
* {@inheritDoc }
*/
@Override
@SuppressWarnings( "unchecked" )
public Object postProcessAfterInitialization( final Object o,
final String string )
throws BeansException
{
final Class clazz = o.getClass();
if( ResourceConfig.isProviderClass( clazz ) )
{
log.info( "Registering bean %s of type %s as a provider class",
string,
clazz.getName() );
classes.add( clazz );
}
else if( ResourceConfig.isRootResourceClass( clazz ) )
{
log.info( "Registering bean %s of type %s as a root resource class",
string,
clazz.getName() );
classes.add( clazz );
}
return o;
}
}
代码示例来源:origin: uk.org.retep.tools/nio
public final void bind( SocketAddress endPoint )
throws IOException
{
// If no endPoint is provided, then get a non-local IPV4 address
if( endPoint == null )
{
endPoint = new InetSocketAddress( getLocalInetAddress(), 0 );
}
// Create the channel and bind the associated socket to the endPoint
serverChannel = ServerSocketChannel.open();
serverChannel.configureBlocking( false );
serverSocket = serverChannel.socket();
serverSocket.bind( endPoint );
// Show the banner in the logs, will contain the IP, port and interface
networkInterface = NetworkInterface.getByInetAddress(
serverSocket.getInetAddress() );
getLog().info(
"\n" +
"----------------------------------------------------------------------\n" +
"%s: %s|%d on %s\n" +
"----------------------------------------------------------------------",
getClass().getSimpleName(),
serverSocket.getInetAddress().getHostAddress(),
serverSocket.getLocalPort(),
networkInterface == null ? "Unknown" : networkInterface.getName() );
getLog().info( "Now receiving accept" );
}
代码示例来源:origin: uk.org.retep.tools/nio
@Override
public void read( final SocketChannel channel, final ByteBuffer buffer )
throws IOException
{
try
{
getLog().info( "A %d %d", buffer.position(), buffer.limit() );
getXMLStreamReader( buffer );
getLog().info( "B %d %d", buffer.position(), buffer.limit() );
do
{
while( xmlStreamReader.hasNext() )
{
getLog().info( "C %d %d", buffer.position(), buffer.limit() );
parser.processEvents( xmlStreamReader );
}
getLog().info( "D %d %d", buffer.position(), buffer.limit() );
} while( inputStream.available() > 0 );
getLog().info( "E %d %d", buffer.position(), buffer.limit() );
}
catch( XMLStreamException ex )
{
parser.notifyStreamError( ex );
throw new IOException( ex );
}
}
代码示例来源:origin: uk.org.retep.xmpp.server/multiUserChat
@Override
public <T> XMPPLogic process( @Nonnull final XMPPServer<T> server,
@Nonnull final MucService service,
@Nullable final MucRoom room,
@Nonnull final Presence<?, ?> presence )
throws MessageException
{
// This is the departing users room jid
final JID jidInRoom = presence.getTo();
getLog().info( "%s left %s", presence.getFrom(), jidInRoom );
// Remove the user from the room
final MucRoomMember leavingMember = room.remove( jidInRoom );
// now send the relevant messages
return roomLeaveBroadcast( server, service, room, presence, jidInRoom, leavingMember );
}
代码示例来源:origin: uk.org.retep.tools/httpd
getLog().info( "Removing HttpContext %s on HttpServer %s", path,
httpServer.getAddress() );
代码示例来源:origin: uk.org.retep.tools/nio
@Override
public void closing( final SocketChannel channel )
{
if( parser != null )
{
parser.notifyStreamClosed();
parser.removeListener( this );
parser = null;
}
if( xmlStreamReader != null )
{
try
{
xmlStreamReader.close();
}
catch( XMLStreamException ex )
{
getLog().info( "Exception closing XMLStreamParser", ex );
}
xmlStreamReader = null;
}
super.closing( channel );
}
代码示例来源:origin: uk.org.retep.xmpp.server/multiUserChat
@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() );
}
}
}
}
};
代码示例来源:origin: uk.org.retep.xmpp/core
@Override
protected void consumePresence( Presence presence )
throws MessageException
{
getLog().info( "Presence %s from %s to %s type %s",
presence.getId(),
presence.getFrom(),
presence.getTo(),
presence.getType() );
}
}
代码示例来源:origin: uk.org.retep.xmpp/core
@Override
protected void consumeIq( Iq iq )
throws MessageException
{
getLog().info( "Iq %s from %s to %s type %s",
iq.getId(),
iq.getFrom(),
iq.getTo(),
iq.getType() );
}
代码示例来源:origin: uk.org.retep.xmpp/core
@Override
protected void consumeMessage( Message message )
throws MessageException
{
getLog().info( "Message %s from %s to %s type %s",
message.getId(),
message.getFrom(),
message.getTo(),
message.getType() );
}
代码示例来源:origin: uk.org.retep.templateEngine/templateEngine
@WriteLock
private void registerMacro( final MacroVisitor macro,
final boolean throwException )
throws MacroAlreadyRegisteredException
{
final Macro annotation = getAnnotation( macro );
if( macros.containsKey( annotation.name() ) )
{
if( throwException )
{
throw new MacroAlreadyRegisteredException( annotation );
}
}
else
{
macros.put( annotation.name(), macro );
getLog().info( "Registered macro %s [%s]", annotation.name(), macro );
}
}
代码示例来源:origin: uk.org.retep.xmpp.server/multiUserChat
/**
* {@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() );
}
}
}
}
}
代码示例来源:origin: uk.org.retep.tools/httpd
getLog().info( "%s: %s %s", exchange.getHttpContext().getPath(),
method, exchange.getRequestURI() );
内容来源于网络,如有侵权,请联系作者删除!