mirror of
https://github.com/PretendoNetwork/BOSS.git
synced 2026-04-17 02:27:03 -05:00
feat: add pretty logging to config validation
This commit is contained in:
parent
56cb17d598
commit
a108e82bfc
|
|
@ -2,6 +2,11 @@ import crypto from 'node:crypto';
|
|||
import path from 'node:path';
|
||||
import fs from 'fs-extra';
|
||||
import dotenv from 'dotenv';
|
||||
import pinoPretty from 'pino-pretty';
|
||||
import { pino } from 'pino';
|
||||
|
||||
// temporary logger - just for configuration (as log level and format is not yet known in this file)
|
||||
const logger = pino(pinoPretty());
|
||||
|
||||
dotenv.config();
|
||||
|
||||
|
|
@ -189,12 +194,12 @@ if (disabledFeatures.s3) {
|
|||
}
|
||||
|
||||
for (const warning of warnings) {
|
||||
console.warn(warning);
|
||||
logger.warn(warning);
|
||||
}
|
||||
|
||||
if (errors.length !== 0) {
|
||||
for (const error of errors) {
|
||||
console.error(error);
|
||||
logger.error(error);
|
||||
}
|
||||
|
||||
process.exit(0);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user