Knopflerfish OSGi 3.4.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 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 timestamp used when presenting log entries.
 

Method Detail

commit

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


isDefaultConfig

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


setMemorySize

public 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

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

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

setFilter

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

Parameters:
filter - the new default filter level.

getFilter

public int getFilter()

setFilter

public 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

public java.util.HashMap getFilters()

setOut

public 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

public boolean getOut()

setFile

public void setFile(boolean f)

getFile

public boolean getFile()

getDir

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

setFileSize

public void setFileSize(int fS)

getFileSize

public int getFileSize()

setMaxGen

public void setMaxGen(int maxGen)

getMaxGen

public int getMaxGen()

setFlush

public void setFlush(boolean f)

getFlush

public boolean getFlush()

setTimestampPattern

public void setTimestampPattern(java.lang.String pattern)
Define the format of the timestamp 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

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

Knopflerfish OSGi 3.4.0