FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
adminforth/adminforth/modules/logger.ts at test · devforth/adminforth · GitHub
devforth
adminforth
Repository navigation
Code
Issues
16
(16)
Pull requests
4
(4)
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
adminforth
/
adminforth
/
modules
/
logger.ts
Copy path
More file actions
More file actions
Latest commit
History
History
History
27 lines (23 loc) · 747 Bytes
Breadcrumbs
adminforth
/
adminforth
/
modules
/
logger.ts
Copy path
File metadata and controls
27 lines (23 loc) · 747 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import
pino
from
'pino'
;
const
baseLogger
=
pino
(
{
transport
:
{
target
:
'pino-pretty'
,
options
:
{
colorize
:
true
,
ignore
:
'pid,hostname'
,
singleLine
:
process
.
env
.
AF_LOG_SINGLE_LINE
===
'true'
||
process
.
env
.
AF_LOG_SINGLE_LINE
===
'1'
,
}
}
,
}
)
;
export
const
logger
=
baseLogger
.
child
(
{
name
:
'User logs'
}
,
{
level
:
process
.
env
.
HEAVY_DEBUG
?
'trace'
:
(
process
.
env
.
DEBUG_LEVEL
||
'info'
)
}
,
)
;
export
const
afLogger
=
baseLogger
.
child
(
{
name
:
'AF'
}
,
{
level
:
process
.
env
.
HEAVY_DEBUG
?
'trace'
:
(
process
.
env
.
AF_DEBUG_LEVEL
||
'info'
)
}
)
;
export
const
dbLogger
=
baseLogger
.
child
(
{
name
:
'DB'
}
,
{
level
:
process
.
env
.
HEAVY_DEBUG_QUERY
?
'trace'
:
(
process
.
env
.
DB_DEBUG_LEVEL
||
'info'
)
}
)
;
Back
|
FazBrowse Home
|
New Git URL