Package org.apache.log.format

Examples of org.apache.log.format.Formatter


        final String contextkey =
            m_configuration.getAttribute( "context-key", "servlet-context" );
        final ServletContext sctx;

        final Configuration confFormat = configuration.getChild( "format" );
        final Formatter formatter = getFormatter( confFormat );

        try
        {
            sctx = (ServletContext)m_context.get( contextkey );
        }
View Full Code Here


        return new ServletOutputLogTarget( sctx, formatter );
    }

    protected Formatter getFormatter( final Configuration conf )
    {
        Formatter formatter = null;

        if( null != conf )
        {
            final FormatterFactory formatterFactory = new FormatterFactory();
            formatter = formatterFactory.createFormatter( conf );
View Full Code Here

                                                  streamConfig.getLocation(), e );
            }
        }

        final Configuration formatterConf = configuration.getChild( "format" );
        final Formatter formatter = getFormatter( formatterConf );

        return new StreamTarget( stream, formatter );
    }
View Full Code Here

        super.contextualize( newContext );
    }

    protected Formatter getFormatter( final Configuration conf )
    {
        Formatter formatter = null;

        if( null != conf )
        {
            final FormatterFactory formatterFactory = new FormatterFactory();
            formatter = formatterFactory.createFormatter( conf );
View Full Code Here

        final boolean append = confAppend.getValueAsBoolean( false );

        final LogTarget logtarget;

        final File file = new File( filename );
        final Formatter formatter = getFormatter( confFormat );

        try
        {
            if( null == confRotation )
            {
View Full Code Here

        }
    }

    protected Formatter getFormatter( final Configuration conf )
    {
        Formatter formatter = null;

        if( null != conf )
        {
            final FormatterFactory formatterFactory = new FormatterFactory();
            formatter = formatterFactory.createFormatter( conf );
View Full Code Here

                final String aux = propertyConf[ i ].getAttribute( "aux", null );

                properties[ i ] = new PropertyInfo( name, type, aux );
            }

            final Formatter formatter = getFormatter( formatterConf );

            return new TextMessageBuilder( properties, formatter );
        }

        return new ObjectMessageBuilder();
View Full Code Here

        return new ObjectMessageBuilder();
    }

    protected Formatter getFormatter( final Configuration conf )
    {
        Formatter formatter = null;

        if( null != conf )
        {
            final FormatterFactory formatterFactory = new FormatterFactory();
            formatter = formatterFactory.createFormatter( conf );
View Full Code Here

{
  private static final String FORMAT = "%7.7{priority} %5.5{time}   [%8.8{category}] (%{context}): %{message}\\n%{throwable}";

  protected Formatter getFormatter(final Configuration conf)
  {
    Formatter formatter = null;

    if (null != conf)
    {
      formatter = new ExtendedPatternFormatter(conf.getValue(FORMAT));
    }
View Full Code Here

{
  private static final String FORMAT = "%7.7{priority} %5.5{time}   [%8.8{category}] (%{context}): %{message}\\n%{throwable}";

  protected Formatter getFormatter(final Configuration conf)
  {
    Formatter formatter = null;

    if (null != conf)
    {
      formatter = new ExtendedPatternFormatter(conf.getValue(FORMAT));
    }
View Full Code Here

TOP

Related Classes of org.apache.log.format.Formatter

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.