Generic.Client.LocalLogs
Type: Client event (monitoring)
Writes client logs to an encrypted local container file with configurable row limit (with flush) and size limit.
To retrieve and decrypt the container, use
Generic.Client.LocalLogsRetrieve
Required permissions: FILESYSTEM_WRITE
Implied permissions: SERVER_ADMIN
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
LocalFilename |
string | %TEMP%/locallogs.log |
The local filename that will be written (Env variables will be expanded). |
MaxRows |
int | 100 |
Flush the file when we cache this many rows. |
MaxWait |
int | 60 |
Flush the file at least every this many seconds. |
MaxSize |
int | 100000000 |
Truncate the file once it reaches this length. |
AlsoForward |
bool | By default we do not forward any of the logs to the server but this allows logs to be forwarded as well as written locally. | |
Component |
choices | generic |
The log component to forward (default “generic”) |
Source
Defined in artifacts/definitions/Generic/Client/LocalLogs.yaml.
name: Generic.Client.LocalLogs
description: |
Writes client logs to an encrypted local container file with
configurable row limit (with flush) and size limit.
To retrieve and decrypt the container, use
`Generic.Client.LocalLogsRetrieve`
type: CLIENT_EVENT
required_permissions:
- FILESYSTEM_WRITE
implied_permissions:
- SERVER_ADMIN
parameters:
- name: LocalFilename
default: "%TEMP%/locallogs.log"
description: The local filename that will be written (Env variables will be expanded).
- name: MaxRows
type: int
default: "100"
description: Flush the file when we cache this many rows.
- name: MaxWait
default: "60"
type: int
description: Flush the file at least every this many seconds.
- name: MaxSize
default: "100000000"
type: int
description: Truncate the file once it reaches this length.
- name: AlsoForward
type: bool
description: |
By default we do not forward any of the logs to the server but
this allows logs to be forwarded as well as written locally.
- name: Component
default: generic
description: The log component to forward (default "generic")
type: choices
choices:
- generic
- client
- frontend
- gui
- api
sources:
- query: |
LET _ <= log(message="Writing local log to " + expand(path=LocalFilename))
SELECT * FROM write_crypto_file(
max_rows=MaxRows, max_wait=MaxWait, max_size=MaxSize,
filename=expand(path=LocalFilename),
query={
SELECT timestamp(epoch=now()) AS Timestamp, *
FROM logging(component=Component)
})
WHERE AlsoForward