Debugging
There’s a built-in logger that can help diagnose some issues.
Enabling logging
Section titled “Enabling logging”memospot: log: enabled: trueyq -i '.memospot.log.enabled = true' "$Env:LocalAppData\memospot\memospot.yaml"yq -i '.memospot.log.enabled = true' "~/.memospot/memospot.yaml"Disabling logging
Section titled “Disabling logging”It’s recommended to leave log disabled when not needed.
memospot: log: enabled: falseyq -i '.memospot.log.enabled = false' "$Env:LocalAppData\memospot\memospot.yaml"yq -i '.memospot.log.enabled = false' "~/.memospot/memospot.yaml"Increasing log level
Section titled “Increasing log level”root: level: debugyq -i '.root.level = "debug"' "$Env:LocalAppData\memospot\log.yaml"yq -i '.root.level = "debug"' "~/.memospot/log.yaml"Default log.yaml
Section titled “Default log.yaml”# https://docs.rs/log4rs/latest/log4rs/config/index.html#configuration# https://github.com/estk/log4rs#quick-start## Use absolute paths to prevent trying to write next to the application binary.# Data directory is available as `$ENV{MEMOSPOT_DATA}`.appenders: memospot: encoder: pattern: "{d(%Y-%m-%d %H:%M:%S)} {h({l})} {module}: {m}{n}" path: $ENV{MEMOSPOT_DATA}/memospot.log kind: rolling_file policy: trigger: kind: size limit: 1 mb roller: kind: fixed_window pattern: $ENV{MEMOSPOT_DATA}/memospot.log.{}.gz count: 5 base: 1 memos: path: $ENV{MEMOSPOT_DATA}/memos.log encoder: pattern: "{message}" kind: rolling_file policy: trigger: kind: size limit: 1 mb roller: kind: fixed_window pattern: $ENV{MEMOSPOT_DATA}/memos.log.{}.gz count: 5 base: 1root: # General app log: debug | info | warn | error | off # Can be increased from `info` to `debug` to ease development. level: info appenders: [memospot]loggers: memospot_lib::memos_log: # Memos server log: info | warn | error | off level: info additive: false # Prevents duplicate log messages. appenders: [memos] # Suppress messages from dependencies. h2: { level: off } hyper_util: { level: off } reqwest: { level: off } tauri_plugin_updater: { level: off }Extra configurations options can be found in the log4rs documentation