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

Function makeTestLogger

packages/effect/test/Stream.test.ts:975–984  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

973 type IgnoreOptions = { readonly log?: boolean | LogLevel.Severity }
974
975 const makeTestLogger = () => {
976 const capturedLogs: Array<{
977 readonly logLevel: LogLevel.LogLevel
978 readonly cause: Cause.Cause<unknown>
979 }> = []
980 const testLogger = Logger.make<unknown, void>((options) => {
981 capturedLogs.push({ logLevel: options.logLevel, cause: options.cause })
982 })
983 return { capturedLogs, testLogger }
984 }
985
986 const runIgnore = (options?: IgnoreOptions, currentLogLevel: LogLevel.Severity = "Info") =>
987 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