[
https://issues.apache.org/jira/browse/FELIX-4720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14239111#comment-14239111
]
Marcel Offermans commented on FELIX-4720:
-----------------------------------------
The specification does not explicitly state that that history can be empty:
{quote}The Log Reader Service maintains a list of LogEntry objects called the
log. The Log Reader Service is a service that bundle developers can use to
retrieve information contained in this log, and receive noti- fications about
LogEntry objects when they are created through the Log Service.
The size of the log is implementation-specific, and it determines how far into
the past the log entries go. Additionally, some log entries may not be recorded
in the log in order to save space. In particular, LOG_DEBUG log entries may not
be recorded. Note that this rule is implementation-dependent. Some
implementations may allow a configurable policy to ignore certain LogEntry
object types.{quote}
Sure, you can interpret it like that, just like you can interpret it the other
way round and implement an infinite buffer. Both are extremes. If you reason
like that than you could also say that WebConsole and Gogo do not fail: they
show everything that is provided. Of course this then becomes a silly
discussion.
But it is as least as reasonable to ask Equinox to fix this, as it is to ask
all other bundles that consume the LogReaderService to provide a second cache.
Or, alternatively, you can provide an extra bundle to provide that cache (and
publish a LogReaderService for all other consumers).
> Web Console and Gogo rely on Log history buffer in the Log Service
> ------------------------------------------------------------------
>
> Key: FELIX-4720
> URL: https://issues.apache.org/jira/browse/FELIX-4720
> Project: Felix
> Issue Type: Bug
> Components: Gogo Command, Web Console
> Reporter: Peter Kriens
>
> The OSGi Log Reader Service has a command to get the history of the log.
> However, the specification states that this history can be empty. The Equinox
> framework is nowadays registering a Log Reader Service that has such an empty
> history to prevent pinning objects in memory.
> Using the history this way was always at odds with the specification since
> the history was only intended to hold the start up events. The primary model
> of the Log Service is a dispatcher.
> I suggest that the Gogo log command and the Web Console maintain their own
> history buffer to become independent on this fragile history buffer in the
> Log Reader service.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)