Skip to content

Commit acc631f

Browse files
author
Manuel
committed
feat: add logger
1 parent ceaea24 commit acc631f

12 files changed

+451
-44
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: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"env-var": "7.4.1",
2222
"keyv": "4.5.3",
2323
"open-graph-scraper": "6.2.2",
24-
"param-case": "3.0.4"
24+
"param-case": "3.0.4",
25+
"pino": "8.15.1"
2526
},
2627
"devDependencies": {
2728
"@types/node": "20.6.0",
@@ -35,6 +36,8 @@
3536
"eslint-plugin-simple-import-sort": "10.0.0",
3637
"eslint-plugin-sonarjs": "0.21.0",
3738
"eslint-plugin-unused-imports": "3.0.0",
39+
"pino-dev": "4.0.2",
40+
"pino-pretty": "10.2.0",
3841
"prettier": "3.0.3",
3942
"tsup": "7.2.0",
4043
"type-fest": "4.3.1",

0 commit comments

Comments
 (0)