Skip to content

Commit 2e3baaa

Browse files
author
Manuel
committed
feat: add logger
1 parent 8032141 commit 2e3baaa

10 files changed

+377
-191
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# SETUP
22
DISCORD_TOKEN=
3+
LOGLEVEL=
34

45
# DB
56
REDIS_URL=

.eslintrc.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ settings:
2020
import/resolver:
2121

2222
rules:
23+
no-restricted-syntax:
24+
- error
25+
- selector: CallExpression[callee.object.name='console'][callee.property.name!=/^(log|warn|error|info|trace)$/]
26+
message: Use logger instead of console
2327
import/exports-last: error
2428
import/first: error
2529
import/no-duplicates: error

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"keyv": "4.5.4",
2424
"open-graph-scraper": "6.3.0",
2525
"param-case": "3.0.4",
26+
"pino": "8.15.1",
2627
"zod": "3.22.4"
2728
},
2829
"devDependencies": {
@@ -38,6 +39,8 @@
3839
"eslint-plugin-sonarjs": "0.21.0",
3940
"eslint-plugin-unused-imports": "3.0.0",
4041
"npm-run-all": "4.1.5",
42+
"pino-dev": "4.0.2",
43+
"pino-pretty": "10.2.0",
4144
"prettier": "3.0.3",
4245
"tsup": "7.2.0",
4346
"type-fest": "4.4.0",

0 commit comments

Comments
 (0)