Skip to content

Commit

Permalink
fix color option for Logger.prettyLogger (#4236)
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-smart authored Jan 13, 2025
1 parent b788806 commit 0def088
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/tall-games-draw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": patch
---

fix color option for Logger.prettyLogger
2 changes: 1 addition & 1 deletion packages/effect/src/internal/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ const prettyLoggerTty = (options: {
readonly formatDate: (date: Date) => string
}) => {
const processIsBun = typeof process === "object" && "isBun" in process && process.isBun === true
const color = options.colors && processStdoutIsTTY ? withColor : withColorNoop
const color = options.colors ? withColor : withColorNoop
return makeLogger<unknown, void>(
({ annotations, cause, context, date, fiberId, logLevel, message: message_, spans }) => {
const services = FiberRefs.getOrDefault(context, defaultServices.currentServices)
Expand Down

0 comments on commit 0def088

Please sign in to comment.