2019-04-10 15:26:33 +02:00
|
|
|
import { exists } from './misc'
|
|
|
|
import { LogLevel } from '../../../shared/models/server/log-level.type'
|
|
|
|
|
|
|
|
const logLevels: LogLevel[] = [ 'debug', 'info', 'warn', 'error' ]
|
|
|
|
|
|
|
|
function isValidLogLevel (value: any) {
|
2020-02-28 16:03:39 +01:00
|
|
|
return exists(value) && logLevels.includes(value)
|
2019-04-10 15:26:33 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
export {
|
|
|
|
isValidLogLevel
|
|
|
|
}
|