Handling Debug Log String Evaluation in Production

Even though Effects are lazily evaluated, the debug log strings are still evaluated aren't they? How do you deal with that in prod? In the background there are a million complex debug log string creations going on even though they're not printing... For example some of my debug logs and stringifying large objects and whatnot

const task1 = Effect.gen(function* (someComplexObject : ComplexObject) {
  yield* Effect.sleep("2 seconds")
  yield* Effect.logDebug("task1 done", someComplexObject)
})


Even if debugging logging is disabled, someComplexObject will be stringified ?
Was this page helpful?