genode/repos/os/src/server/fs_log
Norman Feske 5a1cef6381 Make label prefixing more strict
This patch unconditionally applies the labeling of sessions and thereby
removes the most common use case of 'Child_policy::filter_session_args'.
Furthermore, the patch removes an ambiguity of the session labels of
sessions created by the parent of behalf of its child, e.g., the PD
session created as part of 'Child' now has the label "<child-name>"
whereas an unlabeled PD-session request originating from the child
has the label "<child-name> -> ". This way, the routing-policy of
'Child_policy::resolve_session_request' can differentiate both cases.

As a consequence, the stricter labeling must now be considered wherever
a precise label was specified as a key for a session route or a server-
side policy selection. The simplest way to adapt those cases is to use a
'label_prefix' instead of the 'label' attribute. Alternatively, the
'label' attribute may used by appending " -> " (note the whitespace).

Fixes #2171
2016-11-30 13:37:07 +01:00
..
main.cc server/fs_log: improve client isolation 2016-08-29 17:29:34 +02:00
README Make label prefixing more strict 2016-11-30 13:37:07 +01:00
session.h server/fs_log: improve client isolation 2016-08-29 17:29:34 +02:00
target.mk server/fs_log: improve client isolation 2016-08-29 17:29:34 +02:00

LOG server that writes log messages onto a file system.

Log files are creating in a directory tree formed from session labels.
As an example the session label "init -> nitpicker" would create
a log file at "init/nitpicker.log".

The option to truncate files at the start of each LOG session is available
through session policy, as well the option to merge the logs of any
session matching a given policy. When a merged policy label contains a
trailing "->", the log filename takes the name of the next label element.

When a default-policy node specifies a merge, all sessions are merged into
the file "/log".

:Example configuration:
! <start name="log_file">
!   <resource name="RAM" quantum="1M"/>
!   <provides><service name="LOG"/></provides>
!   <config>
!     <policy label_prefix="nic_drv" truncate="no"/>
!     <policy label_prefix="cli_monitor -> " merge="yes"/>
!     <default-policy truncate="yes"/>
!   </config>
! </start>