Package org.apache.turbine.services.logging

Examples of org.apache.turbine.services.logging.LoggingService


     * This is a log method with logLevel == ERROR, printing is done by
     * the given logger
     */
    public static void error(String logName, String message, RunData data)
    {
        LoggingService logger = (LoggingService)TurbineServices.getInstance()
            .getService(LoggingService.SERVICE_NAME);
        logger.error(logName, message, data);
    }
View Full Code Here


    public static void error(String logName,
                            String message,
                            RunData data,
                            Throwable t)
    {
        LoggingService logger = (LoggingService)TurbineServices.getInstance()
            .getService(LoggingService.SERVICE_NAME);
        logger.error(logName, message, data, t);
    }
View Full Code Here

     *
     * @deprecated You should use info or debug methods instead.
     */
    public static void note(String message)
    {
        LoggingService logger = (LoggingService)TurbineServices.getInstance()
            .getService(LoggingService.SERVICE_NAME);
        logger.info(message);
    }
View Full Code Here

     *
     * @deprecated You should use info or debug methods instead.
     */
    public static void note(String logName, String message)
    {
        LoggingService logger = (LoggingService)TurbineServices.getInstance()
            .getService(LoggingService.SERVICE_NAME);
        logger.info(logName, message);
    }
View Full Code Here

     */
    public void notice(String msg)
    {
        if (enabledLogging)
        {
            LoggingService logger=(LoggingService)TurbineServices
                .getInstance().getService(LoggingService.SERVICE_NAME);
            if (logger==null)
            {
                System.out.println("(!) NOTICE: "+msg);
                return;
            }
            logger.info(msg);
        }
        else
        {
            System.out.println("NOTICE: "+msg);
        }
View Full Code Here

     */
    public void error(Throwable t)
    {
        if (enabledLogging)
        {
            LoggingService logger =
                (LoggingService)getService(LoggingService.SERVICE_NAME);
            if (logger==null)
            {
                System.out.println("(!) ERROR: "+t.getMessage());
                return;
            }
            logger.error("",t);
        }
        else
        {
            System.out.println("ERROR: "+t.getMessage());
            t.printStackTrace();
View Full Code Here

     * Allows logging using a logging service instead of console
     * This method should be called after initialization of the logging service
     */
    private void enableLogging()
    {
        LoggingService logger=(LoggingService)getService(LoggingService.SERVICE_NAME);
        if (logger!=null)
        {
            logger.info("ServiceBroker: LoggingService enabled.");
            enabledLogging=true;
        }
    }
View Full Code Here

     * This method has been deprecated, attempts to shutdown logger service.
     * @deprecated The service should be shut down by the broker class only.
     */
    public static void destroy()
    {
        LoggingService logger = (LoggingService)TurbineServices.getInstance()
            .getService(LoggingService.SERVICE_NAME);
        logger.shutdown();
    }
View Full Code Here

     *
     * @return The default logger for system.
     */
    public static Logger getLogger()
    {
        LoggingService logger = (LoggingService)TurbineServices.getInstance()
            .getService(LoggingService.SERVICE_NAME);
        return logger.getLogger();
    }
View Full Code Here

     * This method returns logger with given name if such logger exsists,
     * or the default logger.
     */
    public static Logger getLogger(String logName)
    {
        LoggingService logger = (LoggingService)TurbineServices.getInstance()
            .getService(LoggingService.SERVICE_NAME);
        return logger.getLogger(logName);
    }
View Full Code Here

TOP

Related Classes of org.apache.turbine.services.logging.LoggingService

Copyright © 2018 www.massapicom. 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.