Module Simantics/AuditLogging/Client

This module is undocumented. This is a list of its definitions.

auditLoggingClient :: Map.T a a -> <Proc> b

Configures the audit logging client of this process from a property map, reading the server address from org.simantics.audit.serverAddress and the client identifier from org.simantics.audit.clientId. A missing client identifier is replaced by a fresh UUID. Registration with the server happens here unless this workspace already holds a UUID from an earlier run.

Only the first call configures the client; later calls return the client that was configured first. Returns null, and only warns, if no server address is given.

The other functions here take the configuration from the JVM system properties instead, so this is needed only to configure the client from somewhere else.

getAuditLoggingUUID :: <Proc> String

The UUID this workspace is registered under at the audit logging server.

sendError :: [a] -> <Proc> ()

As sendLog, but at error level.

sendErrorM :: Map.T String a -> <Proc> ()

As sendLogM, but at error level.

sendLog :: [a] -> <Proc> ()

As sendLogM, but the event is given as a flat list of alternating keys and values, as in sendLog ["user", "matti", "action", "open"]. Fails if the list has an odd number of elements or a key that is not a string.

sendLogM :: Map.T String a -> <Proc> ()

Sends an event to the audit logging server at info level. If no server is configured, the event goes to the local log instead. If sending fails, the event is written into the local audit log under the key local and the failure is raised.

sendTrace :: [a] -> <Proc> ()

As sendLog, but at trace level.

sendTraceM :: Map.T String a -> <Proc> ()

As sendLogM, but at trace level.