diff --git a/IOB-WIN/AdapterForm.cs b/IOB-WIN/AdapterForm.cs index ee6ef3f7..75692744 100644 --- a/IOB-WIN/AdapterForm.cs +++ b/IOB-WIN/AdapterForm.cs @@ -113,8 +113,16 @@ namespace IOB_WIN } set { - lblLogfile.Text = limitLine2show($"{value}{Environment.NewLine}{lblLogfile.Text}"); - lblLogfile.Refresh(); + try + { + lblLogfile.Text = limitLine2show($"{value}{Environment.NewLine}{lblLogfile.Text}"); + lblLogfile.Refresh(); + } + catch (Exception exc) + { + string aCapo = Environment.NewLine; + lgError($"Errore in esecuzione logWatcher{aCapo}stringa: {value}{aCapo}{exc}") + } } } /// @@ -128,8 +136,16 @@ namespace IOB_WIN } set { - lblTaskLog.Text = limitLine2show($"{value}{Environment.NewLine}{lblTaskLog.Text}"); - lblTaskLog.Refresh(); + try + { + lblTaskLog.Text = limitLine2show($"{value}{Environment.NewLine}{lblTaskLog.Text}"); + lblTaskLog.Refresh(); + } + catch (Exception exc) + { + string aCapo = Environment.NewLine; + lgError($"Errore in esecuzione taskWatcher{aCapo}stringa: {value}{aCapo}{exc}") + } } } diff --git a/IOB-WIN/IobGeneric.cs b/IOB-WIN/IobGeneric.cs index 61885c46..9ead1a4e 100644 --- a/IOB-WIN/IobGeneric.cs +++ b/IOB-WIN/IobGeneric.cs @@ -722,11 +722,14 @@ namespace IOB_WIN /// Effettua logging INFO corretto impostanto anche la variabile IOB prima di scrivere... /// /// - protected void lgInfo(string message) + protected void lgInfo(string message, bool sendToForm = true) { lg.Factory.Configuration.Variables["codIOB"] = cIobConf.codIOB; lg.Info(message); - sendToLogWatch("INFO", message); + if (sendToForm) + { + sendToLogWatch("INFO", message); + } } /// /// Effettua logging INFO corretto impostanto anche la variabile IOB prima di scrivere... @@ -743,11 +746,14 @@ namespace IOB_WIN /// Effettua logging ERROR corretto impostanto anche la variabile IOB prima di scrivere... /// /// - protected void lgError(string message) + protected void lgError(string message, bool sendToForm = true) { lg.Factory.Configuration.Variables["codIOB"] = cIobConf.codIOB; - lg.Error(message); - sendToLogWatch("ERROR", message); + lg.Error(message); + if (sendToForm) + { + sendToLogWatch("ERROR", message); + } } /// /// Effettua logging ERROR corretto impostanto anche la variabile IOB prima di scrivere... @@ -776,11 +782,14 @@ namespace IOB_WIN /// Effettua logging FATAL corretto impostanto anche la variabile IOB prima di scrivere... /// /// - protected void lgFatal(string message) + protected void lgFatal(string message, bool sendToForm = true) { lg.Factory.Configuration.Variables["codIOB"] = cIobConf.codIOB; - lg.Fatal(message); - sendToLogWatch("FATAL", message); + lg.Fatal(message); + if (sendToForm) + { + sendToLogWatch("FATAL", message); + } } /// /// Effettua logging FATAL corretto impostanto anche la variabile IOB prima di scrivere... diff --git a/IOB-WIN/IobMTC.cs b/IOB-WIN/IobMTC.cs index 3752a611..a524c8c5 100644 --- a/IOB-WIN/IobMTC.cs +++ b/IOB-WIN/IobMTC.cs @@ -691,7 +691,7 @@ namespace IOB_WIN } catch (Exception exc) { - lgError($"Eccezione in decodifica Conditions x StreamSuccesfull{Environment.NewLine}{exc}"); + lgError($"Eccezione in decodifica Conditions x StreamSuccesfull{Environment.NewLine}{exc}", false); } // check su events try @@ -716,7 +716,7 @@ namespace IOB_WIN } catch (Exception exc) { - lgError($"Eccezione in decodifica Events x StreamSuccesfull{Environment.NewLine}{exc}"); + lgError($"Eccezione in decodifica Events x StreamSuccesfull{Environment.NewLine}{exc}", false); } // check su samples @@ -742,7 +742,7 @@ namespace IOB_WIN { if (utils.CRB("verbose")) { - lgInfo($"NON ACCODATO sample poiché verifica variazione SAMPLE ha dato esito negativo"); + lgInfo($"NON ACCODATO sample poiché verifica variazione SAMPLE ha dato esito negativo", false); } } } diff --git a/Jenkinsfile b/Jenkinsfile index 89d4d617..7c56374e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,7 +16,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=571']) { + withEnv(['NEXT_BUILD_NUMBER=572']) { // env.versionNumber = VersionNumber(versionNumberString : '2.6.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '2.6.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.APP_NAME = 'MAPO-IOB-WIN'