Package org.apache.log.output

Examples of org.apache.log.output.FileOutputLogTarget


       
        /*
         * Just create a FileOutputLogTarget, this is taken
         * from the SAR deployer in Avalon.
         */
        FileOutputLogTarget target = new FileOutputLogTarget();
        File logFileLocation = new File (logFile);
       
        logPath = logFileLocation.getAbsolutePath();

        target.setFilename( logPath );
        target.setFormatter(new VelocityFormatter());
        target.setFormat("%{time} %{message}\\n%{throwable}" );
       
        LogTarget logTargets[] = null;
               
        if ( null != target )
        {
View Full Code Here


     @param logFile   file for log messages
     */
    public void init(String logFile)
        throws Exception
    {
        FileOutputLogTarget target = new FileOutputLogTarget();
        File logFileLocation = new File (logFile);
       
        logPath = logFileLocation.getAbsolutePath();

        target.setFilename( logPath );
        target.setFormatter(new VelocityFormatter());
        target.setFormat("%{time} %{message}\\n%{throwable}" );
               
        /*
         *  use the toString() of RuntimeServices to make a unique logger
         */

 
View Full Code Here

       
        /*
         * Just create a FileOutputLogTarget, this is taken
         * from the SAR deployer in Avalon.
         */
        FileOutputLogTarget target = new FileOutputLogTarget();
        File logFileLocation = new File (logFile);
       
        logPath = logFileLocation.getAbsolutePath();

        target.setFilename( logPath );
        target.setFormatter(new VelocityFormatter());
        target.setFormat("%{time} %{message}\\n%{throwable}" );
       
        LogTarget logTargets[] = null;
               
        if ( null != target )
        {
View Full Code Here

     @param logFile   file for log messages
     */
    public void init(String logFile)
        throws Exception
    {
        FileOutputLogTarget target = new FileOutputLogTarget();
        File logFileLocation = new File (logFile);
       
        logPath = logFileLocation.getAbsolutePath();

        target.setFilename( logPath );
        target.setFormatter(new VelocityFormatter());
        target.setFormat("%{time} %{message}\\n%{throwable}" );
               
        logger = Hierarchy.getDefaultHierarchy().getLoggerFor( "velocity" );
        logger.setPriority( Priority.DEBUG );
        logger.setLogTargets( new LogTarget[] { target } );
    }
View Full Code Here

TOP

Related Classes of org.apache.log.output.FileOutputLogTarget

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.