(name?: string)
| 323 | |
| 324 | /** @internal */ |
| 325 | export 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 */ |
| 339 | export const duration = (name?: string): Config.Config<Duration.Duration> => { |
nothing calls this directly
no test coverage detected