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

Function logLevel

packages/effect/src/internal/config.ts:334–345  ·  view source on GitHub ↗
(name?: string)

Source from the content-addressed store, hash-verified

332
333/** @internal */
334export const logLevel = (name?: string): Config.Config<LogLevel.LogLevel> => {
335 const config = mapOrFail(string(), (value) => {
336 const label = value.toUpperCase()
337 const level = core.allLogLevels.find((level) => level.label === label)
338 return level === undefined
339 ? Either.left(
340 configError.InvalidData([], `Expected a log level but received ${formatUnknown(value)}`)
341 )
342 : Either.right(level)
343 })
344 return name === undefined ? config : nested(config, name)
345}
346
347/** @internal */
348export const duration = (name?: string): Config.Config<Duration.Duration> => {

Callers

nothing calls this directly

Calls 2

formatUnknownFunction · 0.85
stringFunction · 0.70

Tested by

no test coverage detected