summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-11-01 01:52:05 +0100
committerwm4 <wm4@nowhere>2019-11-01 01:52:05 +0100
commitfdce778605648da249bef9eb0c9ce31ada89777e (patch)
tree570190b4dd7348785e9a26e5c2e854f0b3b9ab26
parent02cb44ac8b5a56a0b76af74e5a5e7ae737fab65c (diff)
downloadmpv-fdce778605648da249bef9eb0c9ce31ada89777e.tar.bz2
mpv-fdce778605648da249bef9eb0c9ce31ada89777e.tar.xz
lua: change config file logging
Make the existing "not found" messages debug only, and add a new verbose message if a config file was opened. The idea is that logging should make it apparent whether or not config files are loaded, and it's more common to use scripts without config files, leading to fewer log messages in verbose mode.
-rw-r--r--player/lua/options.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/player/lua/options.lua b/player/lua/options.lua
index 4d05587ef1..a23417ae7d 100644
--- a/player/lua/options.lua
+++ b/player/lua/options.lua
@@ -40,7 +40,7 @@ local function read_options(options, identifier)
local conffilename = "script-opts/" .. identifier .. ".conf"
local conffile = mp.find_config_file(conffilename)
if conffile == nil then
- msg.verbose(conffilename .. " not found.")
+ msg.debug(conffilename .. " not found.")
conffilename = "lua-settings/" .. identifier .. ".conf"
conffile = mp.find_config_file(conffilename)
if conffile then
@@ -50,9 +50,10 @@ local function read_options(options, identifier)
local f = conffile and io.open(conffile,"r")
if f == nil then
-- config not found
- msg.verbose(conffilename .. " not found.")
+ msg.debug(conffilename .. " not found.")
else
-- config exists, read values
+ msg.verbose("Opened config file " .. conffilename .. ".")
local linecounter = 1
for line in f:lines() do
if string.find(line, "#") == 1 then