unbbayes.io.log
Class TextLogManager

java.lang.Object
  extended by unbbayes.io.log.TextLogManager
All Implemented Interfaces:
Serializable, ILogManager
Direct Known Subclasses:
NetworkCompilationLogManager, SSBNTextLogManager

public class TextLogManager
extends Object
implements ILogManager, Serializable

Responsible for generating network compilation log

Version:
2.0
Author:
Rommel N. Carvalho, Michael S. Onishi, Laecio L. dos Santos
See Also:
Serialized Form

Field Summary
static int DEFAULT_BUFFER_SIZE
           
static String DEFAULT_FILENAME
           
static String identationString
           
static int numColumn
           
protected static ResourceBundle resource
          Load resource file from this package
static String separator
           
 
Constructor Summary
TextLogManager()
           
TextLogManager(int bufferSize)
           
 
Method Summary
 void addTitle(String text)
          Add the title of the log
 void append(String text)
          Append the text
 void appendIfTrue(boolean debug, String text)
           
 void appendln(int identation, String text)
           
 void appendln(String text)
          Append the text and make new line.
 void appendlnIfTrue(boolean debug, String text)
           
 void appendlnIfTrue(int identation, boolean debug, String text)
           
 void appendSectionTitle(String text)
          Append a section title
 void appendSeparator()
          Append separator line.
 void appendSpecialTitle(String text)
          Append a section title
 void clear()
          Clear the log information.
 Boolean getEnabled()
           
 String getLog()
          Get the log how a String.
 Boolean isEnabled()
           
 void reset()
           
 void setEnabled(boolean enabled)
          If this log manager is enabled or not.
 void writeToDisk(String fileName, boolean append)
          Write the log in a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_BUFFER_SIZE

public static final int DEFAULT_BUFFER_SIZE
See Also:
Constant Field Values

DEFAULT_FILENAME

public static final String DEFAULT_FILENAME
See Also:
Constant Field Values

numColumn

public static final int numColumn
See Also:
Constant Field Values

separator

public static final String separator
See Also:
Constant Field Values

identationString

public static final String identationString
See Also:
Constant Field Values

resource

protected static ResourceBundle resource
Load resource file from this package

Constructor Detail

TextLogManager

public TextLogManager(int bufferSize)

TextLogManager

public TextLogManager()
Method Detail

clear

public void clear()
Description copied from interface: ILogManager
Clear the log information.

Specified by:
clear in interface ILogManager

reset

public void reset()

append

public void append(String text)
Description copied from interface: ILogManager
Append the text

Specified by:
append in interface ILogManager

appendIfTrue

public void appendIfTrue(boolean debug,
                         String text)

appendln

public void appendln(String text)
Description copied from interface: ILogManager
Append the text and make new line.

Specified by:
appendln in interface ILogManager

appendlnIfTrue

public void appendlnIfTrue(boolean debug,
                           String text)

appendln

public void appendln(int identation,
                     String text)

appendlnIfTrue

public void appendlnIfTrue(int identation,
                           boolean debug,
                           String text)

appendSeparator

public void appendSeparator()
Description copied from interface: ILogManager
Append separator line.

Specified by:
appendSeparator in interface ILogManager

getLog

public String getLog()
Description copied from interface: ILogManager
Get the log how a String.

Specified by:
getLog in interface ILogManager

writeToDisk

public void writeToDisk(String fileName,
                        boolean append)
                 throws IOException
Description copied from interface: ILogManager
Write the log in a file.

Specified by:
writeToDisk in interface ILogManager
Throws:
IOException

addTitle

public void addTitle(String text)
Description copied from interface: ILogManager
Add the title of the log

Specified by:
addTitle in interface ILogManager

appendSectionTitle

public void appendSectionTitle(String text)
Description copied from interface: ILogManager
Append a section title

Specified by:
appendSectionTitle in interface ILogManager

appendSpecialTitle

public void appendSpecialTitle(String text)
Description copied from interface: ILogManager
Append a section title

Specified by:
appendSpecialTitle in interface ILogManager

setEnabled

public void setEnabled(boolean enabled)
If this log manager is enabled or not. When not enabled, any call would do nothing.

Parameters:
enabled - the enabled to set. True to enable. False to disable

getEnabled

public Boolean getEnabled()

isEnabled

public Boolean isEnabled()


Copyright © 2001-2010 University of Brasilia - UnB. All Rights Reserved.