Skip to content

Commit 8a31da0

Browse files
committed
feat: log levels export options and helper to find by type
1 parent 0b316af commit 8a31da0

File tree

2 files changed

+28
-8
lines changed

2 files changed

+28
-8
lines changed

src/config/log-levels.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/log-levels.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
export const levels = [
2+
{
3+
type: 'success',
4+
emoji: '✅'
5+
},
6+
{
7+
type: 'info',
8+
emoji: 'ℹ️'
9+
},
10+
{
11+
type: 'warn',
12+
emoji: '⚠️'
13+
},
14+
{
15+
type: 'error',
16+
emoji: '🚫'
17+
},
18+
{
19+
type: 'debug',
20+
emoji: '🐛'
21+
},
22+
{
23+
type: 'trace',
24+
emoji: '🐾'
25+
},
26+
]
27+
28+
export const getLevelByType = type => levels.find(l => l.type === type);

0 commit comments

Comments
 (0)