Knopflerfish OSGi 5.2.0

org.knopflerfish.service.log
Interface LogConfig


public interface LogConfig


Method Summary
 void commit()
          If CM is available, upload the current configuration to CM.
 java.io.File getDir()
           
 boolean getFile()
           
 int getFileSize()
           
 int getFilter()
           
 java.util.HashMap<java.lang.String,java.lang.Integer> getFilters()
           
 boolean getFlush()
           
 int getMaxGen()
           
 int getMemorySize()
          Get the number of log entries that are kept in memory.
 boolean getOut()
           
 java.lang.String getTimestampPattern()
           
 boolean isDefaultConfig()
          Returns false when the configuration is obtained from CM.
 void setFile(boolean f)
           
 void setFileSize(int fS)
           
 void setFilter(int filter)
          Set the default filter level.
 void setFilter(java.lang.String bundleLocation, int filter)
          Set the filter level for bundles that matches the pattern.
 void setFlush(boolean f)
           
 void setMaxGen(int maxGen)
           
 void setMemorySize(int size)
          Set number of log entries that are kept in memory.
 void setOut(boolean b)
          Property controlling if log entries are written to System.out or not.
 void setTimestampPattern(java.lang.String pattern)
          Define the format of the time-stamp used when presenting log entries.
 

Method Detail

commit

void commit()
If CM is available, upload the current configuration to CM.


isDefaultConfig

boolean isDefaultConfig()
Returns false when the configuration is obtained from CM.


setMemorySize

void setMemorySize(int size)
Set number of log entries that are kept in memory.

Parameters:
size - the new maximum number of log entries in memory.

getMemorySize

int getMemorySize()
Get the number of log entries that are kept in memory.

Returns:
number of log entries that are kept in memory.

setFilter

void setFilter(int filter)
Set the default filter level.

Parameters:
filter - the new default filter level.

getFilter

int getFilter()

setFilter

void setFilter(java.lang.String bundleLocation,
               int filter)
Set the filter level for bundles that matches the pattern. The pattern may be one of:

Parameters:
bundleLocation - A pattern to be matched against the bundle.
filter - the new default filter level.

getFilters

java.util.HashMap<java.lang.String,java.lang.Integer> getFilters()

setOut

void setOut(boolean b)
Property controlling if log entries are written to System.out or not.

Parameters:
b - if true log entries will be written to System.out.

getOut

boolean getOut()

setFile

void setFile(boolean f)

getFile

boolean getFile()

getDir

java.io.File getDir()
Returns:
the directory that the file log is written to.

setFileSize

void setFileSize(int fS)

getFileSize

int getFileSize()

setMaxGen

void setMaxGen(int maxGen)

getMaxGen

int getMaxGen()

setFlush

void setFlush(boolean f)

getFlush

boolean getFlush()

setTimestampPattern

void setTimestampPattern(java.lang.String pattern)
Define the format of the time-stamp used when presenting log entries. I.e., in the file log and to System.out.

Parameters:
pattern - Date time pattern as defined in java.text.SimpleDateFormat(java.lang.String). If the given pattern is invalid, the old pattern is keept.

getTimestampPattern

java.lang.String getTimestampPattern()
Returns:
the current timestamp pattern.

Knopflerfish OSGi 5.2.0