migliorato logging in procedura CDV...

This commit is contained in:
Samuele E. Locatelli
2018-11-09 12:25:18 +01:00
parent 0798b5ee61
commit 6cda6eca07
+11 -6
View File
@@ -162,6 +162,7 @@ namespace SteamWare
}
redSaveHash(ACBH, valori);
lastUpdateAppConf = DateTime.Now;
logger.lg.scriviLog("Completato procedura startupAppConf ", tipoLog.INFO);
}
}
catch (Exception exc)
@@ -198,6 +199,8 @@ namespace SteamWare
{
answ.Add(riga.chiave, riga.valore);
}
// log ricarica
logger.lg.scriviLog(string.Format("Effettuata procedura ricaricaAppConf per {0} records", answ.Count), tipoLog.INFO);
return answ;
}
/// <summary>
@@ -251,7 +254,7 @@ namespace SteamWare
}
catch (Exception exc)
{
logger.lg.scriviLog("Errore configDbVal: " + exc.ToString(), tipoLog.EXCEPTION);
logger.lg.scriviLog(string.Format("Errore in lettura chiave [{0}] durante configDbVal{1}{2}", chiave, Environment.NewLine, exc), tipoLog.EXCEPTION);
}
// controllo SE è passato più di 5 minuti, nel caso faccio refresh...
if (DateTime.Now.Subtract(lastUpdateAppConf).TotalMinutes > maxAge)
@@ -290,8 +293,10 @@ namespace SteamWare
{
answ = Convert.ToBoolean(configDbVal(chiave));
}
catch
{ }
catch (Exception exc)
{
logger.lg.scriviLog(string.Format("Errore in lettura chiave [{0}] durante cdvb{1}{2}", chiave, Environment.NewLine, exc), tipoLog.EXCEPTION);
}
return answ;
}
/// <summary>
@@ -308,7 +313,7 @@ namespace SteamWare
}
catch (Exception exc)
{
logger.lg.scriviLog("errore in cdvi: " + exc.ToString(), tipoLog.EXCEPTION);
logger.lg.scriviLog(string.Format("Errore in lettura chiave [{0}] durante cdvi{1}{2}", chiave, Environment.NewLine, exc), tipoLog.EXCEPTION);
}
return answ;
}
@@ -1135,9 +1140,9 @@ namespace SteamWare
{
Dictionary<string, string> answ = new Dictionary<string, string>();
var cacheVal = objCacheObj("tabelleInCache");
if(cacheVal!=null)
if (cacheVal != null)
{
answ= (Dictionary<string, string>)cacheVal;
answ = (Dictionary<string, string>)cacheVal;
}
return answ;
}