-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix compatibility with node, add scripts
- Loading branch information
Tiago Posse
committed
Aug 29, 2023
1 parent
09c0d68
commit c2832bb
Showing
12 changed files
with
89 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -167,3 +167,7 @@ dist | |
.yarn/build-state.yml | ||
.yarn/install-state.gz | ||
.pnp.\* | ||
|
||
# build dirs | ||
build | ||
build.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,23 @@ | ||
import winston from 'winston'; | ||
import { createLogger, format, transports, LogEntry } from 'winston'; | ||
import tty from 'tty'; | ||
|
||
const LOG_LEVEL = process.env.LOG_LEVEL || 'info'; | ||
|
||
export const logger = winston.createLogger({ | ||
export const logger = createLogger({ | ||
level: LOG_LEVEL, | ||
format: winston.format.json(), | ||
defaultMeta: { service: 'gitlab-sso-sync' }, | ||
format: tty.isatty(process.stdout.fd) ? format.combine( | ||
format.colorize(), | ||
format.simple() | ||
) : format.combine( | ||
format.timestamp(), | ||
format.json() | ||
), | ||
transports: [ | ||
new winston.transports.Console({ | ||
format: winston.format.simple() | ||
}), | ||
new transports.Console({ | ||
format: format.combine(format.printf((log: LogEntry) => { | ||
return JSON.stringify(log, null); | ||
})) | ||
}) | ||
], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.