-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #188 from nasa-petal/Issue185_OY
Issue185 oy
- Loading branch information
Showing
7 changed files
with
335 additions
and
99 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 |
---|---|---|
|
@@ -9,4 +9,6 @@ | |
!.vscode/settings.json | ||
!.vscode/extensions.json | ||
!.vscode/tasks.json | ||
.conda | ||
.conda | ||
.env | ||
Large diffs are not rendered by default.
Oops, something went wrong.
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
Binary file not shown.
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,37 @@ | ||
import pino from 'pino'; | ||
// import fs from 'fs'; | ||
// import path from 'path'; | ||
|
||
|
||
// // Ensure the logs directory exists | ||
// const logsDir = path.resolve('./logs'); | ||
// if (!fs.existsSync(logsDir)) { | ||
// fs.mkdirSync(logsDir); | ||
// } | ||
|
||
|
||
|
||
// // Create a write stream for the log file | ||
// const logFileStream = fs.createWriteStream(path.join(logsDir, 'application.log'), { flags: 'a' }); | ||
|
||
// const logger = pino( | ||
// { | ||
// level: 'debug', // Set the desired log level | ||
// transport: { | ||
// target: 'pino-pretty', // Human-readable logs in terminal | ||
// options: { colorize: true }, // Colorize logs for console | ||
// }, | ||
// }, | ||
// logFileStream // Write logs to the file | ||
// ); | ||
|
||
// export default logger; | ||
|
||
const logger = { | ||
debug: (msg, obj) => console.debug(`[DEBUG] ${msg}`, obj), | ||
info: (msg, obj) => console.info(`[INFO] ${msg}`, obj), | ||
warn: (msg, obj) => console.warn(`[WARN] ${msg}`, obj), | ||
error: (msg, obj) => console.error(`[ERROR] ${msg}`, obj), | ||
}; | ||
|
||
export default logger; |
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