File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " git-json-resolver " : patch
3
+ ---
4
+
5
+ Fix logger
Original file line number Diff line number Diff line change @@ -66,12 +66,11 @@ export const createLogger = (config: LoggerConfig = {}) => {
66
66
67
67
const flush = ( ) => {
68
68
if ( mode === "memory" ) {
69
+ const timestamp = new Date ( ) . toISOString ( ) . replace ( / : / g, "-" ) ;
69
70
for ( const [ fileId , entries ] of buffers . entries ( ) ) {
70
71
const filePath = path . join (
71
72
logDir ,
72
- singleFile
73
- ? `combined-${ new Date ( ) . toISOString ( ) } .log`
74
- : `${ fileId } -${ new Date ( ) . toISOString ( ) } .log` ,
73
+ singleFile ? `combined-${ timestamp } .log` : `${ fileId } -${ timestamp } .log` ,
75
74
) ;
76
75
const lines = entries . map ( e => `[${ e . timestamp } ] [${ e . level . toUpperCase ( ) } ] ${ e . message } ` ) ;
77
76
fs . writeFileSync ( filePath , lines . join ( "\n" ) + "\n" , { flag : "a" } ) ;
You can’t perform that action at this time.
0 commit comments