Page tree
Skip to end of metadata
Go to start of metadata

The OSGI Log Reader allows the Aspire system to log all messages with a severity above debug to a single file. The OSGI log reader is a component itself and uses the standard component logging and therefore:

  • Messages are logged at various levels to a specific file
  • The last n messages are kept in memory and can be reported back via the status page
  • The log file may be rotated on demand while the log reader is running

All log files are written under the $ASPIRE_HOME directory. The actual path for the log file is configured in the component's XML configuration. Log files are rotated on a daily basis, or on a configurable size limit. Rotated log files receive a time stamp upon rotation. The last n messages are kept locally for display. Messages kept locally (for view via the status page) are truncated to 200 characters.

OSGI Log Reader
Factory Namecom.searchtechnologies.aspire:aspire-tools
subType

feederOverview

InputsOSGI log reader service
OutputsLog files

Configuration

ElementTypeDefaultDescription
logfilestringlog/aspireOSGISystem.logThe name of the file to write log messages to.
maxFileSizeint10MbThe maximum size of the log file before automatic rotation to a new file.
keepMessagesint1000The number of messages to retain locally for display via the status page.
minLogLevelstringinfoThe minimum log level message written to the log file. Change the value to warn to prevent info message from being written to the log file.

Example Configurations

Simple

  <component name="log" subType="osgiLogReader" factoryName="aspire-tools">
    <logFile>log/aspireOSGIlog.log</logFile>
    <maxFileSize>209715200</maxFileSize>
  </component>

Complex

  <component name="log" subType="osgiLogReader" factoryName="aspire-tools">
    <logFile>log/aspireOSGIlog.log</logFile>
    <maxFileSize>2097152000</maxFileSize>
    <keepMessages>2000</keepMessages>
    <minLogLevel>warn</minLogLevel>
  </component>

Controlling the OSGI Log Reader via the component

In addition to the view and rotate the log (see Logging) you may also:

  • Change the number of messages kept locally for display by issuing the command keep to the component and adding the parameter numMsg=

    e.g., http://blade3:50505/aspire/systemCommon/log?cmd=keep&numMsg=1000

  • Change the minimum log message level written to the log file by issuing the command minLevel to the component and adding the parameter level=

    e.g., http://blade3:50505/aspire/systemCommon/log?cmd=minLevel&level=warn

  • Cause the log file to be rotated by issuing the command rotate to the component

    e.g., http://blade3:50505/aspire/systemCommon/log?cmd=rotate

  • No labels