Product: OpenFusion Log Service
Version: ALL
Description:
What are the different operations that can be done on the Logs?
Resolution:
Looking at the Log Service specification we see that a log record is made up of the following:
- id - Unique number assigned to the record by the log.
- time - Timestamp indicating the time an event is logged.
- attr_list - User defined name/value pairs that are not a part of the event received by the log. These attributes contain log record related information and can be queried or modified.
- info - The event data stored in a CORBA any.
Note that a structured or typed event can be wrapped in a CORBA any as specified by the Notification Service specification.
Log records can have attributes and you can read and write these attributes. These need to be defined by the client in a meaningful way e.g a (“trouble ticket id”, id) attribute associates a log record with trouble ticket information and a (“comment”, text) attribute allows clients to annotate a log record.
When you assign an attribute it adds the attribute to the log, it does not overwrite the original event data in the info field.
To see this using the GUI:
- Start the log service
- Run the supplier to put some events into the log
- Start the NotifyLog manager
- Go to the log and choose the Operations Tag
- Choose Set Attributes in the Operation field
- Click the add button under the attribute details list. Enter the name, value and type and press ok. In the constraint field add the constraint of the log you want to add the attribute to, e.g. $.info.header.variable_header[2].value==1
- Choose Execute and the attribute should be added to the log
- Now to see the attribute has been added you need to go to operations and choose query
- Click Execute ( the constraint should be the same as before)
- A log record should appear in the record details box. If you click on this log record the attribute should appear in the attribute details list which is under the record details box
#KnowledgeDocs
#OpenFusion