@effect/io
Advanced tools
Comparing version 0.35.0 to 0.35.1
@@ -403,5 +403,12 @@ "use strict"; | ||
const logWithLevel = level => (messageOrCause, supplementry) => { | ||
const message = typeof messageOrCause === "string" ? messageOrCause : ""; | ||
const cause = internalCause.isCause(supplementry) ? supplementry : internalCause.empty; | ||
const levelOption = Option.fromNullable(level); | ||
let message; | ||
let cause; | ||
if (typeof messageOrCause === "string") { | ||
message = messageOrCause; | ||
cause = supplementry ?? internalCause.empty; | ||
} else { | ||
cause = messageOrCause; | ||
message = supplementry ?? ""; | ||
} | ||
return core.withFiberRuntime(fiberState => { | ||
@@ -408,0 +415,0 @@ fiberState.log(message, cause, levelOption); |
{ | ||
"name": "@effect/io", | ||
"version": "0.35.0", | ||
"version": "0.35.1", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -869,5 +869,12 @@ import * as Chunk from "@effect/data/Chunk" | ||
): Effect.Effect<never, never, void> => { | ||
const message = typeof messageOrCause === "string" ? messageOrCause : "" | ||
const cause: Cause.Cause<unknown> = internalCause.isCause(supplementry) ? supplementry : internalCause.empty | ||
const levelOption = Option.fromNullable(level) | ||
let message: string | ||
let cause: Cause.Cause<unknown> | ||
if (typeof messageOrCause === "string") { | ||
message = messageOrCause | ||
cause = (supplementry as Cause.Cause<unknown>) ?? internalCause.empty | ||
} else { | ||
cause = messageOrCause | ||
message = (supplementry as string) ?? "" | ||
} | ||
return core.withFiberRuntime<never, never, void>((fiberState) => { | ||
@@ -874,0 +881,0 @@ fiberState.log(message, cause, levelOption) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6371428
113748