Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
patroza committed Oct 13, 2024
1 parent 1e127fc commit 34890f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/effect/src/internal/fiberRuntime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1491,7 +1491,7 @@ export const tracerLogger = globalValue(
attributes["effect.logLevel"] = logLevel.label

if (cause !== null && cause._tag !== "Empty") {
attributes["effect.cause"] = internalCause.pretty(cause, { renderErrorCause: true })
attributes["effect.cause"] = internalCause.pretty(cause, context, { renderErrorCause: true })
}

span.value.event(
Expand Down
10 changes: 5 additions & 5 deletions packages/effect/src/internal/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ export const stringLogger: Logger.Logger<unknown, string> = makeLogger(

if (cause != null && cause._tag !== "Empty") {
output = output + " cause="
output = appendQuoted(Cause.pretty(cause, { renderErrorCause: true }), output)
output = appendQuoted(Cause.pretty(cause, context, { renderErrorCause: true }), output)
}

if (List.isCons(spans)) {
Expand Down Expand Up @@ -256,7 +256,7 @@ export const logfmtLogger = makeLogger<unknown, string>(

if (cause != null && cause._tag !== "Empty") {
output = output + " cause="
output = appendQuotedLogfmt(Cause.pretty(cause, { renderErrorCause: true }), output)
output = appendQuotedLogfmt(Cause.pretty(cause, context, { renderErrorCause: true }), output)
}

if (List.isCons(spans)) {
Expand Down Expand Up @@ -327,7 +327,7 @@ export const structuredLogger = makeLogger<unknown, {
: messageArr.map((_) => structuredMessage(_, context)),
logLevel: logLevel.label,
timestamp: date.toISOString(),
cause: Cause.isEmpty(cause) ? undefined : Cause.pretty(cause, { renderErrorCause: true }),
cause: Cause.isEmpty(cause) ? undefined : Cause.pretty(cause, context, { renderErrorCause: true }),
annotations: annotationsObj,
spans: spansObj,
fiberId: _fiberId.threadName(fiberId)
Expand Down Expand Up @@ -487,7 +487,7 @@ const prettyLoggerTty = (options: {
if (!processIsBun) console.group()

if (!Cause.isEmpty(cause)) {
log(Cause.pretty(cause, { renderErrorCause: true }))
log(Cause.pretty(cause, context, { renderErrorCause: true }))
}

if (messageIndex < message.length) {
Expand Down Expand Up @@ -552,7 +552,7 @@ const prettyLoggerBrowser = (options: {
console.groupCollapsed(firstLine, ...firstParams)

if (!Cause.isEmpty(cause)) {
console.error(Cause.pretty(cause, { renderErrorCause: true }))
console.error(Cause.pretty(cause, context, { renderErrorCause: true }))
}

if (messageIndex < message.length) {
Expand Down

0 comments on commit 34890f1

Please sign in to comment.