All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.refcodes.logger.alt.console.ConsoleLogger Maven / Gradle / Ivy

There is a newer version: 1.0.5
Show newest version
// /////////////////////////////////////////////////////////////////////////////
// REFCODES.ORG
// /////////////////////////////////////////////////////////////////////////////
// This code is copyright (c) by Siegfried Steiner, Munich, Germany and licensed
// under the following (see "http://en.wikipedia.org/wiki/Multi-licensing")
// licenses:
// -----------------------------------------------------------------------------
// GNU General Public License, v3.0 ("http://www.gnu.org/licenses/gpl-3.0.html")
// -----------------------------------------------------------------------------
// Apache License, v2.0 ("http://www.apache.org/licenses/LICENSE-2.0")
// -----------------------------------------------------------------------------
// Please contact the copyright holding author(s) of the software artifacts in
// question for licensing issues not being covered by the above listed licenses,
// also regarding commercial licensing models or regarding the compatibility
// with other open source licenses.
// /////////////////////////////////////////////////////////////////////////////
package org.refcodes.logger.alt.console;

import java.io.PrintStream;

import org.refcodes.logger.Logger;
import org.refcodes.logger.impls.RuntimeLoggerSingleton;
import org.refcodes.mixin.RowWidthAccessor.RowWidthBuilder;
import org.refcodes.mixin.RowWidthAccessor.RowWidthProperty;
import org.refcodes.textual.TableStyle;
import org.refcodes.textual.TableStyleAccessor.TableStyleBuilder;
import org.refcodes.textual.TableStyleAccessor.TableStyleProperty;

/**
 * @author steiner
 *
 * @param 
 */
public interface ConsoleLogger extends Logger, RowWidthProperty, RowWidthBuilder>, TableStyleProperty, TableStyleBuilder> {

	// enum MemberType { STATIC, INSTACNE }

	// /////////////////////////////////////////////////////////////////////////
	// METHODS:
	// /////////////////////////////////////////////////////////////////////////

	PrintStream getOutStream();

	void setOutStream( PrintStream aOutStream );

	PrintStream getErrStream();

	void setErrStream( PrintStream aErrStream );

	/**
	 * As the underlying configuration framework used by the
	 * {@link RuntimeLoggerSingleton} cannot convert a String to an enum, we got
	 * to provide such a method ourselves. When configuring programmatically use
	 * {@link #setRowWidth(int)} or {@link #withRowWidth(int)}, when using the
	 * "runtimelogger-config.xml" ise the property "tableStyleName" for this
	 * method to be invoked. Valid arguments are as of the {@link TableStyle}
	 * enumeration:
	 * 
	 * 
    *
  • SINGLE
  • *
  • DOUBLE
  • *
  • DOUBLE_SINGLE
  • *
  • SINGLE_DOUBLE
  • *
  • SINGLE_DASHED
  • *
  • ASCII
  • *
  • BLANK
  • *
  • SINGLE_BLANK
  • *
  • ASCII_BLANK
  • *
* * * @param aTableStyleName */ void setTableStyleName( String aTableStyleName ); void setEscCodes( boolean isEscCodesEnabled ); boolean hasLeftBorder(); void setLeftBorder( boolean hasLeftBorder ); boolean hasRightBorder(); void setRightBorder( boolean hasRightBorder ); // void setMemberType( MemberType aMemberType ); // void setMemberTypeName( String aMemberType ); // ///////////////////////////////////////////////////////////////////////// // BUILDER: // ///////////////////////////////////////////////////////////////////////// ConsoleLogger withOutStream( PrintStream aOutStream ); ConsoleLogger withErrStream( PrintStream aErrStream ); ConsoleLogger withEscCodes( boolean isEscCodesEnabled ); ConsoleLogger withLeftBorder( boolean hasLeftBorder ); ConsoleLogger withRightBorder( boolean hasRightBorder ); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy