Skip to content

Commit

Permalink
Merge pull request #2881 from elizaOS/odi-fix
Browse files Browse the repository at this point in the history
fix: LOG_JSON_FORMAT env var setting
  • Loading branch information
odilitime authored Jan 28, 2025
2 parents c7dc222 + eb31fca commit dfbebe8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/core/src/logger.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import pino, { type LogFn } from "pino";
import pretty from "pino-pretty";

import { parseBooleanFromText } from "./parsing.ts";


const customLevels: Record<string, number> = {
fatal: 60,
error: 50,
Expand All @@ -13,7 +16,7 @@ const customLevels: Record<string, number> = {
trace: 10,
};

const raw = process?.env?.LOG_JSON_FORMAT || false;
const raw = parseBooleanFromText(process?.env?.LOG_JSON_FORMAT) || false;

const createStream = () => {
if (raw) {
Expand Down

0 comments on commit dfbebe8

Please sign in to comment.