mirror of https://github.com/Chocobozzz/PeerTube
15 lines
383 B
TypeScript
15 lines
383 B
TypeScript
import { exists } from './misc'
|
|
import { LogLevel } from '../../../shared/models/server/log-level.type'
|
|
|
|
const logLevels: LogLevel[] = [ 'debug', 'info', 'warn', 'error' ]
|
|
|
|
function isValidLogLevel (value: any) {
|
|
return exists(value) && logLevels.indexOf(value) !== -1
|
|
}
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
export {
|
|
isValidLogLevel
|
|
}
|