diff --git a/pages/database-management/configuration.mdx b/pages/database-management/configuration.mdx index 8348a227d..cb00d7c54 100644 --- a/pages/database-management/configuration.mdx +++ b/pages/database-management/configuration.mdx @@ -523,6 +523,7 @@ This section contains the list of all other relevant flags used within Memgraph. | `--isolation-level=SNAPSHOT_ISOLATION` | Isolation level used for the transactions. Allowed values: SNAPSHOT_ISOLATION, READ_COMMITTED, READ_UNCOMMITTED. | `[string]` | | `--log-file=/var/log/memgraph/memgraph.log` | Path to where the log should be stored. If set to an empty string (`--log-file=`), no logs will be saved. | `[string]` | | `--log-level=WARNING` | Minimum log level. Allowed values: TRACE, DEBUG, INFO, WARNING, ERROR, CRITICAL. | `[string]` | +| `--logger-type=sync` | Type of logger used by Memgraph. Allowed values: `sync`, `async`. When set to `async`, log messages are buffered and written in a background thread, reducing the performance impact of logging on query execution. | `[string]` | | `--log-retention-days=35` | Controls for how many days daily log files will be preserved. Allowed values: 1–1000000. | `[uint64]` | | `--memory-limit=0` | Total memory limit in MiB. Set to 0 to use the default values which are 100% of the physical memory if the swap is enabled and 90% of the physical memory otherwise. | `[uint64]` | | `--metrics-address` | Host for HTTP server for exposing metrics. | `[string]` | diff --git a/pages/database-management/logs.mdx b/pages/database-management/logs.mdx index d53ae02df..c49887bee 100644 --- a/pages/database-management/logs.mdx +++ b/pages/database-management/logs.mdx @@ -11,7 +11,6 @@ The default location of logs is inside the `/var/log/memgraph/` directory. That location can be configured using the `--log-file` [configuration flag](/database-management/configuration#other). - Memgraph tracks logs at various levels: TRACE, DEBUG, INFO, WARNING, ERROR, CRITICAL. By default, it is using the WARNING level, but you can change the level using the [`--log-level`](/database-management/configuration#other) @@ -19,6 +18,12 @@ configuration flag or [during runtime](/database-management/configuration#change-configuration-settings-during-runtime) using the `SET DATABASE SETTING "log.level" TO "TRACE";` +By default, Memgraph uses synchronous logging. To reduce the performance impact +of logging on query execution, you can enable asynchronous logging by setting the +[`--logger-type`](/database-management/configuration#other) configuration flag +to `async`. With asynchronous logging, log messages are buffered and written in a +background thread instead of blocking the executing thread. + Memgraph creates daily log files and retains them for 35 days by default. You can change the retention period using the [`--log-retention-days`](/database-management/configuration#other) configuration