Skip to content

Commit dd6d05e

Browse files
committed
feat: Add docs for async logs
1 parent facd751 commit dd6d05e

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

pages/database-management/configuration.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,7 @@ This section contains the list of all other relevant flags used within Memgraph.
522522
| `--isolation-level=SNAPSHOT_ISOLATION` | Isolation level used for the transactions. Allowed values: SNAPSHOT_ISOLATION, READ_COMMITTED, READ_UNCOMMITTED. | `[string]` |
523523
| `--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]` |
524524
| `--log-level=WARNING` | Minimum log level. Allowed values: TRACE, DEBUG, INFO, WARNING, ERROR, CRITICAL. | `[string]` |
525+
| `--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]` |
525526
| `--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]` |
526527
| `--metrics-address` | Host for HTTP server for exposing metrics. | `[string]` |
527528
| `--metrics-port` | Port for HTTP server for exposing metrics. | `[uint64]` |

pages/database-management/logs.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ configuration flag or [during
1919
runtime](/database-management/configuration#change-configuration-settings-during-runtime) using the `SET
2020
DATABASE SETTING "log.level" TO "TRACE";`
2121

22+
By default, Memgraph uses synchronous logging. To reduce the performance impact
23+
of logging on query execution, you can enable asynchronous logging by setting the
24+
[`--logger-type`](/database-management/configuration#other) configuration flag
25+
to `async`. With asynchronous logging, log messages are buffered and written in a
26+
background thread instead of blocking the executing thread.
27+
2228
The configuration set during runtime will be applied only for that session.
2329

2430
You can check the log level by running `SHOW DATABASE SETTING "log.level";` query.

0 commit comments

Comments
 (0)