Skip to content

Commit f071914

Browse files
committed
refactor: update logging configuration in environment files
1 parent 144eed5 commit f071914

2 files changed

Lines changed: 26 additions & 7 deletions

File tree

.env.example

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
# The base URL where Tinyauth is accessible
44
TINYAUTH_APPURL="https://auth.example.com"
5-
# Log level: trace, debug, info, warn, error
6-
TINYAUTH_LOGLEVEL="info"
75
# Directory for static resources
86
TINYAUTH_RESOURCESDIR="/data/resources"
97
# Path to SQLite database file
@@ -14,8 +12,20 @@ TINYAUTH_DISABLEANALYTICS="false"
1412
TINYAUTH_DISABLERESOURCES="false"
1513
# Disable UI warning messages
1614
TINYAUTH_DISABLEUIWARNINGS="false"
15+
16+
# Logging Configuration
17+
18+
# Log level: trace, debug, info, warn, error
19+
TINYAUTH_LOG_LEVEL="info"
1720
# Enable JSON formatted logs
18-
TINYAUTH_LOGJSON="false"
21+
TINYAUTH_LOG_JSON="false"
22+
# Specific Log stream configurations
23+
# APP and HTTP log streams are enabled by default, and use the global log level unless overridden
24+
TINYAUTH_LOG_STREAMS_APP_ENABLED="true"
25+
TINYAUTH_LOG_STREAMS_APP_LEVEL="info"
26+
TINYAUTH_LOG_STREAMS_HTTP_ENABLED="true"
27+
TINYAUTH_LOG_STREAMS_HTTP_LEVEL="info"
28+
TINYAUTH_LOG_STREAMS_AUDIT_ENABLED="false"
1929

2030
# Server Configuration
2131

config.example.yaml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
# The base URL where Tinyauth is accessible
44
appUrl: "https://auth.example.com"
5-
# Log level: trace, debug, info, warn, error
6-
logLevel: "info"
75
# Directory for static resources
86
resourcesDir: "./resources"
97
# Path to SQLite database file
@@ -14,8 +12,19 @@ disableAnalytics: false
1412
disableResources: false
1513
# Disable UI warning messages
1614
disableUIWarnings: false
17-
# Enable JSON formatted logs
18-
logJSON: false
15+
16+
# Logging Configuration
17+
log:
18+
# Log level: trace, debug, info, warn, error
19+
level: "info"
20+
json: false
21+
streams:
22+
app:
23+
level: "warn"
24+
http:
25+
level: "debug"
26+
audit:
27+
enabled: false
1928

2029
# Server Configuration
2130
server:

0 commit comments

Comments
 (0)