MCPcopy Create free account
hub / github.com/Effect-TS/effect / makeTestLogger

Function makeTestLogger

packages/effect/test/Effect.test.ts:2214–2224  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2212 type IgnoreOptions = { readonly log?: boolean | LogLevel.Severity; readonly message?: string }
2213
2214 const makeTestLogger = () => {
2215 const capturedLogs: Array<{
2216 readonly logLevel: LogLevel.LogLevel
2217 readonly cause: Cause.Cause<unknown>
2218 readonly message: unknown
2219 }> = []
2220 const testLogger = Logger.make<unknown, void>((options) => {
2221 capturedLogs.push({ logLevel: options.logLevel, cause: options.cause, message: options.message })
2222 })
2223 return { capturedLogs, testLogger }
2224 }
2225
2226 const runIgnore = (options?: IgnoreOptions, currentLogLevel: LogLevel.Severity = "Info") =>
2227 Effect.gen(function*() {

Callers 2

runIgnoreFunction · 0.70
runIgnoreCauseFunction · 0.70

Calls 2

pushMethod · 0.80
makeMethod · 0.65

Tested by

no test coverage detected