mirror of
https://github.com/bluenviron/mediamtx
synced 2025-02-16 19:46:59 +00:00
allow to set logLevel: error in config
This commit is contained in:
parent
ab70f946b0
commit
9af006b488
@ -15,6 +15,9 @@ func (d LogLevel) MarshalJSON() ([]byte, error) {
|
|||||||
var out string
|
var out string
|
||||||
|
|
||||||
switch d {
|
switch d {
|
||||||
|
case LogLevel(logger.Error):
|
||||||
|
out = "error"
|
||||||
|
|
||||||
case LogLevel(logger.Warn):
|
case LogLevel(logger.Warn):
|
||||||
out = "warn"
|
out = "warn"
|
||||||
|
|
||||||
@ -36,6 +39,9 @@ func (d *LogLevel) UnmarshalJSON(b []byte) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch in {
|
switch in {
|
||||||
|
case "error":
|
||||||
|
*d = LogLevel(logger.Error)
|
||||||
|
|
||||||
case "warn":
|
case "warn":
|
||||||
*d = LogLevel(logger.Warn)
|
*d = LogLevel(logger.Warn)
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
###############################################
|
###############################################
|
||||||
# General parameters
|
# General parameters
|
||||||
|
|
||||||
# sets the verbosity of the program; available values are "warn", "info", "debug".
|
# sets the verbosity of the program; available values are "error", "warn", "info", "debug".
|
||||||
logLevel: info
|
logLevel: info
|
||||||
# destinations of log messages; available values are "stdout", "file" and "syslog".
|
# destinations of log messages; available values are "stdout", "file" and "syslog".
|
||||||
logDestinations: [stdout]
|
logDestinations: [stdout]
|
||||||
|
Loading…
Reference in New Issue
Block a user