UNPKG
filelogs
Version:
latest (1.0.12)
1.0.12
1.0.11
1.0.10
1.0.8
1.0.7
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
0.0.2
0.0.1
write log by date
github.com/liuxiaodong/file-log
liuxiaodong/file-log
filelogs
/
example
/
sub.js
15 lines
(12 loc)
•
272 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
const
FileLog
=
require
(
'../'
)
const
logger
=
FileLog
({
level
:
'verbose'
,
output
:
true
,
writeFile
:
false
,
dir
:
'./'
,
name
:
'test'
,
subscribe
: function(levelStr, msg) { console.
log
(levelStr, msg); } }) logger.
info
(
'123123'
, {
a
:
'1'
});