From 99c2e0445624aff04b7e5ebdcde4558aec8352f5 Mon Sep 17 00:00:00 2001 From: Christopher Date: Wed, 10 Jun 2020 12:49:36 +0200 Subject: [PATCH] add more debug --- src/DataValue.cs | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/src/DataValue.cs b/src/DataValue.cs index 6d9a73f..f260d58 100644 --- a/src/DataValue.cs +++ b/src/DataValue.cs @@ -22,8 +22,7 @@ namespace OpenSim.Modules.DataValue class DataValue : INonSharedRegionModule { #region Region Module - private static readonly ILog m_log = - LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private Scene m_scene = null; private IConfig m_config = null; @@ -55,15 +54,19 @@ namespace OpenSim.Modules.DataValue { try { - if ((m_config = source.Configs["XEngine"]) == null) - { - // There is no configuration, the module is disabled - // m_log.InfoFormat("[JsonStoreScripts] no configuration info"); - return; - } + m_config = source.Configs["XEngine"]; - m_dataValueDirectory = m_config.GetString("DataValueStorageDirectory", m_dataValueDirectory); - m_enabled = m_config.GetBoolean("Enabled", m_enabled); + if (m_config != null) + { + m_dataValueDirectory = m_config.GetString("DataValueStorageDirectory", m_dataValueDirectory); + m_enabled = m_config.GetBoolean("Enabled", m_enabled); + + m_log.DebugFormat("[" + Name + "]: Data storage: = " + m_dataValueDirectory); + } + else + { + m_log.DebugFormat("[" + Name + "]: Cant find config."); + } } catch (Exception e) { @@ -72,7 +75,14 @@ namespace OpenSim.Modules.DataValue } if (m_enabled) - m_log.DebugFormat("[" + Name + "]: module is enabled"); + { + m_log.InfoFormat("[" + Name + "]: module is enabled"); + } + else + { + m_log.InfoFormat("[" + Name + "]: module is disabled"); + } + } public void RegionLoaded(Scene scene)