Package org.slf4j

Examples of org.slf4j.Logger.info()



                @Override
                public void run() {
                    synchronized (this) {
                        log.info("shutdown hook was invoked, " + this.shutdownTimes.incrementAndGet());
                        if (!this.hasShutdown) {
                            this.hasShutdown = true;
                            long begineTime = System.currentTimeMillis();
                            controller.shutdown();
                            long consumingTimeTotal = System.currentTimeMillis() - begineTime;
View Full Code Here


                        if (!this.hasShutdown) {
                            this.hasShutdown = true;
                            long begineTime = System.currentTimeMillis();
                            controller.shutdown();
                            long consumingTimeTotal = System.currentTimeMillis() - begineTime;
                            log.info("shutdown hook over, consuming time total(ms): " + consumingTimeTotal);
                        }
                    }
                }
            }, "ShutdownHook"));
View Full Code Here

            // 启动服务
            controller.start();

            String tip = "The Name Server boot success.";
            log.info(tip);
            System.out.println(tip);

            return controller;
        }
        catch (Throwable e) {
View Full Code Here

        lc.reset();
        configurator.doConfigure("/Users/vive/Desktop/share/work/gitlab/rocketmq/conf/logback_broker.xml");
        final Logger log = LoggerFactory.getLogger(LoggerName.BrokerLoggerName);

        while (true) {
            log.info("hello, current time: {}", System.currentTimeMillis());
        }
    }


    public static void main(String[] args) throws JoranException {
View Full Code Here

    }

    public static void info(IoSession session, String message) {
        Logger log = getLogger(session);
        if (log.isInfoEnabled()) {
            log.info(String.valueOf(session.getAttribute(PREFIX)) + message);
        }
    }

    public static void info(IoSession session, String message, Throwable cause) {
        Logger log = getLogger(session);
View Full Code Here

    }

    public static void info(IoSession session, String message, Throwable cause) {
        Logger log = getLogger(session);
        if (log.isInfoEnabled()) {
            log.info(String.valueOf(session.getAttribute(PREFIX)) + message,
                    cause);
        }
    }

    public static void warn(IoSession session, String message) {
View Full Code Here

    public static void info( IoSession session, String message )
    {
        Logger log = getLogger( session );
        if( log.isInfoEnabled() )
        {
            log.info( String.valueOf( session.getAttribute( PREFIX ) ) + message );
        }
    }

    public static void info( IoSession session, String message, Throwable cause )
    {
View Full Code Here

    public static void info( IoSession session, String message, Throwable cause )
    {
        Logger log = getLogger( session );
        if( log.isInfoEnabled() )
        {
            log.info( String.valueOf( session.getAttribute( PREFIX ) ) + message, cause );
        }
    }

    public static void warn( IoSession session, String message )
    {
View Full Code Here

    private Logger compliantLogger()
    {
        Logger logger = mockLogger();

        logger.info(EasyMock.isA(String.class));

        EasyMock.expectLastCall().atLeastOnce();

        return logger;
    }
View Full Code Here

    public void testLogStringDurationIsNotZero() throws Exception {
        Logger logger = EasyMock.createMock(Logger.class);
        logger.isInfoEnabled();
        EasyMock.expectLastCall().andReturn(true).atLeastOnce();
        logger.info(EasyMock.<Marker>isNull(), EasyMock.startsWith("Received: 10"));
        EasyMock.expectLastCall().once();
        logger.info(EasyMock.<Marker>isNull(), EasyMock.startsWith("Received: 20"));
        EasyMock.expectLastCall().once();
        EasyMock.replay(logger);
        ThroughputLogger underTest = new ThroughputLogger(new CamelLogger(logger));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.