mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 22:27:22 +00:00
set log level to info and output to file
This commit is contained in:
@@ -9,14 +9,14 @@ export const initLogger = async () => {
|
|||||||
const isProduction = nodeEnv === "production";
|
const isProduction = nodeEnv === "production";
|
||||||
const targets: pino.TransportMultiOptions["targets"][number][] = [
|
const targets: pino.TransportMultiOptions["targets"][number][] = [
|
||||||
isProduction
|
isProduction
|
||||||
? { level: "trace", target: "pino/file", options: {} }
|
? { level: "info", target: "pino/file", options: { destination: 'logs/infisical-backend/logs.txt', mkdir: true } }
|
||||||
: {
|
: {
|
||||||
level: "info",
|
level: "info",
|
||||||
target: "pino-pretty", // must be installed separately
|
target: "pino-pretty", // must be installed separately
|
||||||
options: {
|
options: {
|
||||||
colorize: true
|
colorize: true
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
if (awsCloudWatchLogCfg) {
|
if (awsCloudWatchLogCfg) {
|
||||||
@@ -40,7 +40,7 @@ export const initLogger = async () => {
|
|||||||
|
|
||||||
logger = pino(
|
logger = pino(
|
||||||
{
|
{
|
||||||
level: process.env.PINO_LOG_LEVEL || "trace",
|
level: process.env.PINO_LOG_LEVEL || "info",
|
||||||
formatters: {
|
formatters: {
|
||||||
bindings: (bindings) => {
|
bindings: (bindings) => {
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user