Skip to content

Commit 8a132bc

Browse files
committed
fix logging
1 parent 195a693 commit 8a132bc

4 files changed

Lines changed: 7 additions & 3 deletions

File tree

.github/workflows/hosting.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ jobs:
6464
SCRIPT_AFTER: |
6565
echo $RSYNC_STDOUT
6666
cd "${{ vars.TARGET_PATH }}"
67+
mkdir -p logs
68+
chown 1654:1654 logs
6769
ls -al "${{ vars.TARGET_PATH }}"
6870
TAG=${{ steps.setSHAs.outputs.base }} docker compose up --pull=always -d
6971
docker image prune -a -f

.hosting/docker-compose.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ services:
66
env_file: .env
77
volumes:
88
- /usr/share/zoneinfo:/usr/share/zoneinfo:ro
9+
- ./logs:/app/logs
910
restart: no
1011

1112
volumes:

src/SpinRallyBot/appsettings.Development.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44
"Default": "Verbose"
55
},
66
"WriteTo:Console": {
7+
"Name": "Console",
78
"Args": {
89
"restrictedToMinimumLevel": "Verbose"
910
}
1011
},
1112
"WriteTo:File": {
13+
"Name": "File",
1214
"Args": {
1315
"restrictedToMinimumLevel": "Verbose"
1416
}

src/SpinRallyBot/appsettings.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,15 @@
1313
"WriteTo:Console": {
1414
"Name": "Console",
1515
"Args": {
16-
"outputTemplate": "[{Timestamp:HH:mm:ss} {Level:u3}] {Message:lj} <s:{SourceContext}>{NewLine}{Exception}",
17-
"restrictedToMinimumLevel": "Warning"
16+
"outputTemplate": "[{Timestamp:HH:mm:ss} {Level:u3}] {Message:lj} <s:{SourceContext}>{NewLine}{Exception}"
1817
}
1918
},
2019
"WriteTo:File": {
2120
"Name": "File",
2221
"Args": {
2322
"path": "./logs/log.json",
2423
"rollingInterval": "Day",
25-
"formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact",
24+
"formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact"
2625
}
2726
}
2827
},

0 commit comments

Comments
 (0)