MCPcopy Index your code
hub / github.com/Effect-TS/effect / logLevel

Function logLevel

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

Source from the content-addressed store, hash-verified

323
324/** @internal */
325export const logLevel = (name?: string): Config.Config<LogLevel.LogLevel> => {
326 const config = mapOrFail(string(), (value) => {
327 const label = value.toUpperCase()
328 const level = core.allLogLevels.find((level) => level.label === label)
329 return level === undefined
330 ? Either.left(
331 configError.InvalidData([], `Expected a log level but received ${formatUnknown(value)}`)
332 )
333 : Either.right(level)
334 })
335 return name === undefined ? config : nested(config, name)
336}
337
338/** @internal */
339export 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