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