Examples of SyslogFormatter


Examples of de.mnl.util.logging.SyslogFormatter

                rootLogger.addHandler(myHandler);
            } else {
                SyslogHandler myHandler = new SyslogHandler();
                myHandler.setFacility(Facility.DAEMON);
                myHandler.setTag("srcpd4cu");
                myHandler.setFormatter(new SyslogFormatter());
                rootLogger.addHandler(myHandler);
            }
        }

        // Prepare schema verification
View Full Code Here

Examples of org.apache.log.format.SyslogFormatter

            Formatter formatter = null;
            String message = null;

            if( 0 == args.length )
            {
                formatter = new SyslogFormatter( SyslogFormatter.FACILITY_DAEMON );
                message = "hello!!!";
            }
            else
            {
                //final int facility = 9<<3; //Cron
View Full Code Here

Examples of org.apache.log.format.SyslogFormatter

            Formatter formatter = null;
            String message = null;

            if( 0 == args.length )
            {
                formatter = new SyslogFormatter( SyslogFormatter.FACILITY_DAEMON );
                message = "hello!!!";
            }
            else
            {
                //final int facility = 9<<3; //Cron
View Full Code Here

Examples of org.apache.log.format.SyslogFormatter

        assertEquals( "XML formatting of E3", E3_XML, result3 );
    }

    public void testSyslogFormatter()
    {
        final Formatter formatter = new SyslogFormatter( FACILITY_ID, false );

        final String result1 = formatter.format( E1 );
        final String result2 = formatter.format( E2 );
        final String result3 = formatter.format( E3 );

        assertEquals( "SYSLOG formatting of E1", E1_SYSLOG, result1 );
        assertEquals( "SYSLOG formatting of E2", E2_SYSLOG, result2 );
        assertEquals( "SYSLOG formatting of E3", E3_SYSLOG, result3 );
    }
View Full Code Here

Examples of org.apache.log.format.SyslogFormatter

        assertEquals( "SYSLOG formatting of E3", E3_SYSLOG, result3 );
    }

    public void testSyslogWithBannerFormatter()
    {
        final Formatter formatter = new SyslogFormatter( FACILITY_ID, true );

        final String result1 = formatter.format( E1 );
        final String result2 = formatter.format( E2 );
        final String result3 = formatter.format( E3 );

        assertEquals( "SYSLOG with banner formatting of E1", E1_SYSLOG_WB, result1 );
        assertEquals( "SYSLOG with banner formatting of E2", E2_SYSLOG_WB, result2 );
        assertEquals( "SYSLOG with banner formatting of E3", E3_SYSLOG_WB, result3 );
    }
View Full Code Here

Examples of org.apache.log.format.SyslogFormatter

        {
            return new XMLFormatter();
        }
        else if( "syslog".equals( type ) )
        {
            return new SyslogFormatter();
        }
        else if( "pattern".equals( type ) )
        {
            return new PatternFormatter( format );
        }
View Full Code Here

Examples of org.apache.log.format.SyslogFormatter

        {
            return new XMLFormatter();
        }
        else if( "syslog".equals( type ) )
        {
            return new SyslogFormatter();
        }
        else if( "pattern".equals( type ) )
        {
            return new PatternFormatter( format );
        }
View Full Code Here

Examples of org.apache.log.format.SyslogFormatter

        assertEquals( "XML formatting of E3", E3_XML, result3 );
    }

    public void testSyslogFormatter()
    {
        final Formatter formatter = new SyslogFormatter( FACILITY_ID, false );

        final String result1 = formatter.format( E1 );
        final String result2 = formatter.format( E2 );
        final String result3 = formatter.format( E3 );

        assertEquals( "SYSLOG formatting of E1", E1_SYSLOG, result1 );
        assertEquals( "SYSLOG formatting of E2", E2_SYSLOG, result2 );
        assertEquals( "SYSLOG formatting of E3", E3_SYSLOG, result3 );
    }
View Full Code Here

Examples of org.apache.log.format.SyslogFormatter

        assertEquals( "SYSLOG formatting of E3", E3_SYSLOG, result3 );
    }

    public void testSyslogWithBannerFormatter()
    {
        final Formatter formatter = new SyslogFormatter( FACILITY_ID, true );

        final String result1 = formatter.format( E1 );
        final String result2 = formatter.format( E2 );
        final String result3 = formatter.format( E3 );

        assertEquals( "SYSLOG with banner formatting of E1", E1_SYSLOG_WB, result1 );
        assertEquals( "SYSLOG with banner formatting of E2", E2_SYSLOG_WB, result2 );
        assertEquals( "SYSLOG with banner formatting of E3", E3_SYSLOG_WB, result3 );
    }
View Full Code Here

Examples of org.apache.log.format.SyslogFormatter

        assertEquals( "XML formatting of E3", E3_XML, result3 );
    }

    public void testSyslogFormatter()
    {
        final Formatter formatter = new SyslogFormatter( FACILITY_ID, false );

        final String result1 = formatter.format( E1 );
        final String result2 = formatter.format( E2 );
        final String result3 = formatter.format( E3 );

        assertEquals( "SYSLOG formatting of E1", E1_SYSLOG, result1 );
        assertEquals( "SYSLOG formatting of E2", E2_SYSLOG, result2 );
        assertEquals( "SYSLOG formatting of E3", E3_SYSLOG, result3 );
    }
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.