Describe the feature
When using Multi-App Run (dapr run -f), app and daprd log files are always written to /.dapr/logs. This path is hardcoded (DefaultDaprDirName in pkg/standalone/common.go, joined in App.GetLogsDir() in pkg/runfileconfig/run_file_config.go), and the docs note that even renaming the resources folder does not move the log files.
Please add a way to customize the logs directory — for example, a logsDir field in the run template (per app, and/or under common), defaulting to the current .dapr/logs behavior for backward compatibility:
version: 1
common:
logsDir: /var/log/dapr # optional, default: /.dapr/logs
apps:
- appID: myapp
appDirPath: ./myapp
logsDir: /tmp/myapp-logs # optional per-app override
Motivation:
File watchers in dev workflows. Dev servers with file watchers (e.g. uvicorn --reload, which uses watchfiles) recursively watch the project tree. Since log files are written inside appDirPath, every log write generates filesystem events, causing constant churn and a performance penalty. Exclusion filters (--reload-exclude) don't help, because the OS-level recursive watch still receives and delivers the events — the only real fix is for the logs to live outside the watched tree.
Centralized logging. Allows collecting logs from all apps into a single directory for easier inspection and log collection tooling.
Setting appLogDestination/daprdLogDestination to console avoids the file writes but loses persisted logs, so it's a workaround rather than a solution.
Release Note
RELEASE NOTE: ADD Support customizing the log file directory (logsDir) in the Multi-App Run template.
Describe the feature
When using Multi-App Run (dapr run -f), app and daprd log files are always written to /.dapr/logs. This path is hardcoded (DefaultDaprDirName in pkg/standalone/common.go, joined in App.GetLogsDir() in pkg/runfileconfig/run_file_config.go), and the docs note that even renaming the resources folder does not move the log files.
Please add a way to customize the logs directory — for example, a logsDir field in the run template (per app, and/or under common), defaulting to the current .dapr/logs behavior for backward compatibility:
version: 1
common:
logsDir: /var/log/dapr # optional, default: /.dapr/logs
apps:
appDirPath: ./myapp
logsDir: /tmp/myapp-logs # optional per-app override
Motivation:
File watchers in dev workflows. Dev servers with file watchers (e.g. uvicorn --reload, which uses watchfiles) recursively watch the project tree. Since log files are written inside appDirPath, every log write generates filesystem events, causing constant churn and a performance penalty. Exclusion filters (--reload-exclude) don't help, because the OS-level recursive watch still receives and delivers the events — the only real fix is for the logs to live outside the watched tree.
Centralized logging. Allows collecting logs from all apps into a single directory for easier inspection and log collection tooling.
Setting appLogDestination/daprdLogDestination to console avoids the file writes but loses persisted logs, so it's a workaround rather than a solution.
Release Note
RELEASE NOTE: ADD Support customizing the log file directory (logsDir) in the Multi-App Run template.