Ancora minor update x gestione UI + fix chiusura con token corretti
This commit is contained in:
@@ -127,7 +127,31 @@ namespace IOB_UT_NEXT.Iob
|
||||
/// <summary>
|
||||
/// Configurazione gerarchica completa (v 4.x.x.x)
|
||||
/// </summary>
|
||||
public IobConfTree IOBConfFull;
|
||||
public IobConfTree IOBConfFull
|
||||
{
|
||||
get => _IOBConfFull;
|
||||
set
|
||||
{
|
||||
_IOBConfFull = value;
|
||||
SetIOB(value.General.FilenameIOB);
|
||||
}
|
||||
}
|
||||
|
||||
private IobConfTree _IOBConfFull;
|
||||
|
||||
|
||||
private IDisposable _scopeIOB;
|
||||
|
||||
/// <summary>
|
||||
/// Salvo IOB e scope x NLog management
|
||||
/// </summary>
|
||||
/// <param name="newIOB"></param>
|
||||
private void SetIOB(string newIOB)
|
||||
{
|
||||
_scopeIOB?.Dispose(); // rimuove il vecchio valore
|
||||
|
||||
_scopeIOB = ScopeContext.PushProperty("codIOB", newIOB);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ULtimo valore inviato (in caso di disconnessione lo reinvia x garantire watchdog...)
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<targets>
|
||||
<target xsi:type="File"
|
||||
name="f_base"
|
||||
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.log"
|
||||
fileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}.log"
|
||||
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true} | ${message}"
|
||||
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.{###}.log"
|
||||
archiveFileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="90"
|
||||
@@ -21,9 +21,9 @@
|
||||
/>
|
||||
<target xsi:type="File"
|
||||
name="f_error"
|
||||
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.log"
|
||||
fileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}_err.log"
|
||||
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true} | ${message}${newline}${exception:format=tostring}"
|
||||
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.{###}.log"
|
||||
archiveFileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}_err.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="90"
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<targets>
|
||||
<target xsi:type="File"
|
||||
name="f_base"
|
||||
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.log"
|
||||
fileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}.log"
|
||||
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true} | ${message}"
|
||||
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.{###}.log"
|
||||
archiveFileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="90"
|
||||
@@ -21,9 +21,9 @@
|
||||
/>
|
||||
<target xsi:type="File"
|
||||
name="f_error"
|
||||
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.log"
|
||||
fileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}_err.log"
|
||||
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true} | ${message}${newline}${exception:format=tostring}"
|
||||
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.{###}.log"
|
||||
archiveFileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}_err.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="90"
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<targets>
|
||||
<target xsi:type="File"
|
||||
name="f_base"
|
||||
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.log"
|
||||
fileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}.log"
|
||||
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true} | ${message}"
|
||||
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.{###}.log"
|
||||
archiveFileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="90"
|
||||
@@ -21,9 +21,9 @@
|
||||
/>
|
||||
<target xsi:type="File"
|
||||
name="f_error"
|
||||
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.log"
|
||||
fileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}_err.log"
|
||||
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true} | ${message}${newline}${exception:format=tostring}"
|
||||
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.{###}.log"
|
||||
archiveFileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}_err.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="90"
|
||||
|
||||
+136
-115
@@ -20,10 +20,11 @@ using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using YamlDotNet.Core.Tokens;
|
||||
|
||||
namespace IOB_WIN_FORM
|
||||
{
|
||||
public partial class AdapterForm : Form
|
||||
public partial class AdapterForm : Form, IForceUpdateUI
|
||||
{
|
||||
#region Public Fields
|
||||
|
||||
@@ -34,6 +35,18 @@ namespace IOB_WIN_FORM
|
||||
|
||||
#endregion Public Fields
|
||||
|
||||
|
||||
public void ForceUpdateUI()
|
||||
{
|
||||
// aggiorna UI (log, grid, label…)
|
||||
this.UIThread(delegate
|
||||
{
|
||||
bIN.BackColor = decSemaforo(_sIN);
|
||||
bOUT.BackColor = decSemaforo(_sOUT);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
#region Public Constructors
|
||||
|
||||
/// <summary>
|
||||
@@ -42,7 +55,7 @@ namespace IOB_WIN_FORM
|
||||
/// <param name="codIOB"></param>
|
||||
public AdapterForm(string codIOB)
|
||||
{
|
||||
CurrIOB = codIOB;
|
||||
SetIOB(codIOB);
|
||||
// continuo avvio...
|
||||
InitializeComponent();
|
||||
myGraphInitForm();
|
||||
@@ -67,6 +80,24 @@ namespace IOB_WIN_FORM
|
||||
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Button start encapsulato x gestione da classi derivate
|
||||
/// </summary>
|
||||
public Button btnStart
|
||||
{
|
||||
get => start;
|
||||
set => start = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Button stop encapsulato x gestione da classi derivate
|
||||
/// </summary>
|
||||
public Button btnStop
|
||||
{
|
||||
get => stop;
|
||||
set => stop = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Visualizzazione stato di comunicazione attiva con PLC
|
||||
/// </summary>
|
||||
@@ -89,7 +120,6 @@ namespace IOB_WIN_FORM
|
||||
this.UIThread(delegate
|
||||
{
|
||||
lblCNC.ForeColor = value ? Color.SeaGreen : Color.Black;
|
||||
//statusStrip1.Invalidate();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -129,7 +159,6 @@ namespace IOB_WIN_FORM
|
||||
default:
|
||||
break;
|
||||
}
|
||||
//statusStrip1.Invalidate();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -195,17 +224,15 @@ namespace IOB_WIN_FORM
|
||||
get
|
||||
{
|
||||
int answ = 5;
|
||||
try
|
||||
{
|
||||
Int32.TryParse(nLines.Text, out answ);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
Int32.TryParse(nLines.Text, out answ);
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
nLines.Text = value.ToString();
|
||||
this.UIThread(delegate
|
||||
{
|
||||
nLines.Text = value.ToString();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -221,14 +248,13 @@ namespace IOB_WIN_FORM
|
||||
set
|
||||
{
|
||||
_sIN = value;
|
||||
if (!ShouldUpdateUI()) return;
|
||||
var newColor = decSemaforo(value);
|
||||
if (newColor != bIN.BackColor)
|
||||
{
|
||||
if (!ShouldUpdateUI()) return;
|
||||
this.UIThread(delegate
|
||||
{
|
||||
bIN.BackColor = newColor;
|
||||
//bIN.Invalidate();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -246,53 +272,55 @@ namespace IOB_WIN_FORM
|
||||
set
|
||||
{
|
||||
_sOUT = value;
|
||||
if (!ShouldUpdateUI()) return;
|
||||
var newColor = decSemaforo(value);
|
||||
if (newColor != bOUT.BackColor)
|
||||
{
|
||||
if (!ShouldUpdateUI()) return;
|
||||
this.UIThread(delegate
|
||||
{
|
||||
bOUT.BackColor = newColor;
|
||||
//bOUT.Invalidate();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Coda messaggi task
|
||||
/// </summary>
|
||||
private readonly Queue<string> logTaskQueue = new Queue<string>();
|
||||
|
||||
/// <summary>
|
||||
/// Task watcher (in modalità "accodamento in testa" ultimi messaggi...)
|
||||
/// </summary>
|
||||
public string taskWatcher
|
||||
public void AddTaskLog(string value)
|
||||
{
|
||||
get
|
||||
try
|
||||
{
|
||||
return lblTaskLog.Text;
|
||||
// FIFO buffer
|
||||
if (logTaskQueue.Count >= nLine2show)
|
||||
logTaskQueue.Dequeue();
|
||||
|
||||
logTaskQueue.Enqueue(value);
|
||||
|
||||
if (!ShouldUpdateUI())
|
||||
return;
|
||||
|
||||
// snapshot + reverse per mostrare latest in alto
|
||||
var text = string.Join(
|
||||
Environment.NewLine,
|
||||
logTaskQueue.Reverse()
|
||||
);
|
||||
|
||||
this.UIThread(() =>
|
||||
{
|
||||
if (lblTaskLog.Text != text)
|
||||
lblTaskLog.Text = text;
|
||||
});
|
||||
}
|
||||
set
|
||||
catch (Exception exc)
|
||||
{
|
||||
try
|
||||
{
|
||||
logTaskString.Insert(0, value);
|
||||
// se supero limite --> trim!
|
||||
if (logTaskString.Count > nLine2show)
|
||||
{
|
||||
logTaskString = logTaskString.Take(nLine2show).ToList();
|
||||
}
|
||||
if (!ShouldUpdateUI()) return;
|
||||
this.UIThread(delegate
|
||||
{
|
||||
lblTaskLog.Text = string.Join(Environment.NewLine, logTaskString);
|
||||
//lblTaskLog.Invalidate();
|
||||
});
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
lgError($"Errore in esecuzione taskWatcher{Environment.NewLine}--> {value}");
|
||||
if (isVerboseLog)
|
||||
{
|
||||
lgError($"{exc}");
|
||||
}
|
||||
}
|
||||
lgError($"Errore in taskWatcher --> {value}");
|
||||
if (isVerboseLog)
|
||||
lgError($"{exc}");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -414,7 +442,6 @@ namespace IOB_WIN_FORM
|
||||
if (logCounterVeto < adesso || lblCounter.Text != $"{currDispData.counter}")
|
||||
{
|
||||
lblCounter.Text = $"{currDispData.counter}";
|
||||
//lblCounter.Invalidate();
|
||||
logCounterVeto = adesso.AddMilliseconds(delayShowLogMs);
|
||||
}
|
||||
}
|
||||
@@ -422,7 +449,6 @@ namespace IOB_WIN_FORM
|
||||
if (!string.IsNullOrWhiteSpace(currDispData.currBitmap))
|
||||
{
|
||||
lblBitmap.Text = currDispData.currBitmap;
|
||||
//lblBitmap.Invalidate();
|
||||
}
|
||||
// LiveLog
|
||||
if (!string.IsNullOrWhiteSpace(currDispData.newLiveLogData))
|
||||
@@ -568,25 +594,6 @@ namespace IOB_WIN_FORM
|
||||
get => restart;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Button start encapsulato x gestione da classi derivate
|
||||
/// </summary>
|
||||
public Button btnStart
|
||||
{
|
||||
get => start;
|
||||
set => start = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Button stop encapsulato x gestione da classi derivate
|
||||
/// </summary>
|
||||
public Button btnStop
|
||||
{
|
||||
get => stop;
|
||||
set => stop = value;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Modello macchina
|
||||
/// </summary>
|
||||
@@ -625,11 +632,6 @@ namespace IOB_WIN_FORM
|
||||
/// </summary>
|
||||
protected DateTime logCounterVeto { get; set; } = DateTime.Now;
|
||||
|
||||
/// <summary>
|
||||
/// Lista String da mostrare quale TaskLog corrente...
|
||||
/// </summary>
|
||||
protected List<string> logTaskString { get; set; } = new List<string>();
|
||||
|
||||
/// <summary>
|
||||
/// Lista String da mostrare quale WatchLog corrente...
|
||||
/// </summary>
|
||||
@@ -738,13 +740,28 @@ namespace IOB_WIN_FORM
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private IDisposable _scopeIOB;
|
||||
|
||||
/// <summary>
|
||||
/// Salvo IOB e scope x NLog management
|
||||
/// </summary>
|
||||
/// <param name="newIOB"></param>
|
||||
private void SetIOB(string newIOB)
|
||||
{
|
||||
CurrIOB = newIOB;
|
||||
_scopeIOB?.Dispose(); // rimuove il vecchio valore
|
||||
|
||||
_scopeIOB = ScopeContext.PushProperty("codIOB", newIOB);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Effettua logging DEBUG corretto impostanto anche la variabile IOB prima di scrivere...
|
||||
/// </summary>
|
||||
/// <param name="txt2log"></param>
|
||||
protected void lgDebug(string txt2log)
|
||||
{
|
||||
lg.Factory.Configuration.Variables["codIOB"] = this.CurrIOB;//IOBConfFull.General.FilenameIOB ??this.CurrIOB;
|
||||
lg.Debug(txt2log);
|
||||
// salvo anche in logwatcher...
|
||||
newDisplayData currDispData = new newDisplayData();
|
||||
@@ -760,7 +777,6 @@ namespace IOB_WIN_FORM
|
||||
{
|
||||
if (!string.IsNullOrEmpty(txt2log))
|
||||
{
|
||||
lg.Factory.Configuration.Variables["codIOB"] = this.CurrIOB;//IOBConfFull.General.FilenameIOB ??this.CurrIOB;
|
||||
lg.Error(txt2log);
|
||||
// salvo anche in logwatcher... SE non si dimostra ricorsivo...
|
||||
if (!txt2log.Contains("logWatcher"))
|
||||
@@ -778,7 +794,6 @@ namespace IOB_WIN_FORM
|
||||
/// <param name="txt2log"></param>
|
||||
protected void lgInfo(string txt2log)
|
||||
{
|
||||
lg.Factory.Configuration.Variables["codIOB"] = this.CurrIOB;//IOBConfFull.General.FilenameIOB ??this.CurrIOB;
|
||||
lg.Info(txt2log);
|
||||
// salvo anche in logwatcher...
|
||||
newDisplayData currDispData = new newDisplayData();
|
||||
@@ -792,7 +807,6 @@ namespace IOB_WIN_FORM
|
||||
/// <param name="txt2log"></param>
|
||||
protected void lgTrace(string txt2log)
|
||||
{
|
||||
lg.Factory.Configuration.Variables["codIOB"] = this.CurrIOB;//IOBConfFull.General.FilenameIOB ??this.CurrIOB;
|
||||
lg.Trace(txt2log);
|
||||
// salvo anche in logwatcher...
|
||||
newDisplayData currDispData = new newDisplayData();
|
||||
@@ -1317,15 +1331,19 @@ namespace IOB_WIN_FORM
|
||||
case 0:
|
||||
lblRawData.Text = newText;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
lblOutMessage.Text = newText;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
lblOutMessage2.Text = newText;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
lblOutMessage3.Text = newText;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -1826,46 +1844,49 @@ namespace IOB_WIN_FORM
|
||||
/// <param name="updateForm">indica se si debba aggiornare la form (no se si sta chiudendo...)</param>
|
||||
private void fermaTutto(bool stopTimer, bool tryRestart, bool forceDequeue, bool updateForm)
|
||||
{
|
||||
if (iobObj != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
try
|
||||
{
|
||||
// PONTE SYNC/ASYNC: Ora sw.Stop() aspetterà la fine reale dell'operazione
|
||||
Task.Run(async () =>
|
||||
{
|
||||
await iobObj.stopAdapter(tryRestart, forceDequeue);
|
||||
btnStop.Enabled = false;
|
||||
btnStart.Enabled = true;
|
||||
restart.Enabled = false;
|
||||
_isSuspended = true;
|
||||
if (stopTimer)
|
||||
{
|
||||
gather.Enabled = false;
|
||||
await StopWorker();
|
||||
}
|
||||
})
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
lgError($"Errore in fermaTutto |stopTimer: {stopTimer} | tryRestart: {tryRestart} | forceDequeue: {forceDequeue} | updateForm: {updateForm}{Environment.NewLine}{ex.Message}");
|
||||
}
|
||||
|
||||
newDisplayData currDispData = new newDisplayData();
|
||||
currDispData.semIn = Semaforo.SS;
|
||||
currDispData.semOut = Semaforo.SS;
|
||||
if (updateForm)
|
||||
{
|
||||
updateFormDisplay(currDispData);
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
if (iobObj == null)
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
// PONTE SYNC/ASYNC: Ora sw.Stop() aspetterà la fine reale dell'operazione
|
||||
Task.Run(async () =>
|
||||
{
|
||||
lgError($"Errore in chiusura:{Environment.NewLine}{exc}");
|
||||
}
|
||||
await iobObj.stopAdapter(tryRestart, forceDequeue);
|
||||
})
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
|
||||
this.UIThread(() =>
|
||||
{
|
||||
btnStop.Enabled = false;
|
||||
btnStart.Enabled = true;
|
||||
restart.Enabled = false;
|
||||
});
|
||||
_isSuspended = true;
|
||||
Task.Run(async () =>
|
||||
{
|
||||
if (stopTimer)
|
||||
{
|
||||
gather.Enabled = false;
|
||||
await StopWorker();
|
||||
}
|
||||
})
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
lgError($"Errore in fermaTutto |stopTimer: {stopTimer} | tryRestart: {tryRestart} | forceDequeue: {forceDequeue} | updateForm: {updateForm}{Environment.NewLine}{ex.Message}");
|
||||
}
|
||||
|
||||
newDisplayData currDispData = new newDisplayData();
|
||||
currDispData.semIn = Semaforo.SS;
|
||||
currDispData.semOut = Semaforo.SS;
|
||||
if (updateForm)
|
||||
{
|
||||
updateFormDisplay(currDispData);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2428,9 +2449,9 @@ namespace IOB_WIN_FORM
|
||||
// Metodo per fermare tutto (es. nel Form_Closing o Dispose)
|
||||
private async Task StopWorker()
|
||||
{
|
||||
if (_ctsMachine == null) return;
|
||||
if (_ctsServer == null) return;
|
||||
|
||||
_ctsMachine.Cancel();
|
||||
_ctsServer.Cancel();
|
||||
|
||||
try
|
||||
{
|
||||
@@ -2443,10 +2464,10 @@ namespace IOB_WIN_FORM
|
||||
catch (OperationCanceledException) { /* Normale amministrazione */ }
|
||||
finally
|
||||
{
|
||||
if (_ctsMachine != null)
|
||||
if (_ctsServer != null)
|
||||
{
|
||||
_ctsMachine.Dispose();
|
||||
_ctsMachine = null;
|
||||
_ctsServer.Dispose();
|
||||
_ctsServer = null;
|
||||
}
|
||||
if (_workerTask != null)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace IOB_WIN_FORM
|
||||
{
|
||||
public interface IForceUpdateUI
|
||||
{
|
||||
void ForceUpdateUI();
|
||||
}
|
||||
}
|
||||
@@ -134,6 +134,7 @@
|
||||
<DependentUpon>AdapterForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ControlExtensions.cs" />
|
||||
<Compile Include="IForceUpdateUI.cs" />
|
||||
<Compile Include="Iob\BaseObj.cs" />
|
||||
<Compile Include="Iob\Generic.cs" />
|
||||
<Compile Include="Iob\PingWatchDog.cs" />
|
||||
|
||||
@@ -46,6 +46,8 @@ namespace IOB_WIN_FORM.Iob
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Effettua logging DEBUG corretto impostanto anche la variabile IOB prima di scrivere...
|
||||
/// </summary>
|
||||
@@ -56,7 +58,6 @@ namespace IOB_WIN_FORM.Iob
|
||||
// se non ho veto --> loggo
|
||||
if (!doVeto)
|
||||
{
|
||||
lg.Factory.Configuration.Variables["codIOB"] = IOBConfFull.General.FilenameIOB;
|
||||
lg.Debug(message);
|
||||
if (sendToForm)
|
||||
{
|
||||
@@ -76,7 +77,6 @@ namespace IOB_WIN_FORM.Iob
|
||||
// se non ho veto --> loggo
|
||||
if (!doVeto)
|
||||
{
|
||||
lg.Factory.Configuration.Variables["codIOB"] = IOBConfFull.General.FilenameIOB;
|
||||
lg.Debug(message, args);
|
||||
sendToLogWatch("DEBUG", message, args);
|
||||
}
|
||||
@@ -93,7 +93,6 @@ namespace IOB_WIN_FORM.Iob
|
||||
// se non ho veto --> loggo
|
||||
if (!doVeto)
|
||||
{
|
||||
lg.Factory.Configuration.Variables["codIOB"] = IOBConfFull.General.FilenameIOB;
|
||||
lg.Error(message, args);
|
||||
sendToLogWatch("ERROR", message, args);
|
||||
}
|
||||
@@ -109,7 +108,6 @@ namespace IOB_WIN_FORM.Iob
|
||||
// se non ho veto --> loggo
|
||||
if (!doVeto)
|
||||
{
|
||||
lg.Factory.Configuration.Variables["codIOB"] = IOBConfFull.General.FilenameIOB;
|
||||
lg.Error(message);
|
||||
if (sendToForm)
|
||||
{
|
||||
@@ -130,7 +128,6 @@ namespace IOB_WIN_FORM.Iob
|
||||
// se non ho veto --> loggo
|
||||
if (!doVeto)
|
||||
{
|
||||
lg.Factory.Configuration.Variables["codIOB"] = IOBConfFull.General.FilenameIOB;
|
||||
lg.Error(exception, message, args);
|
||||
sendToLogWatch("ERROR", message, exception, args);
|
||||
}
|
||||
@@ -146,7 +143,6 @@ namespace IOB_WIN_FORM.Iob
|
||||
// se non ho veto --> loggo
|
||||
if (!doVeto)
|
||||
{
|
||||
lg.Factory.Configuration.Variables["codIOB"] = IOBConfFull.General.FilenameIOB;
|
||||
lg.Fatal(message);
|
||||
if (sendToForm)
|
||||
{
|
||||
@@ -166,7 +162,6 @@ namespace IOB_WIN_FORM.Iob
|
||||
// se non ho veto --> loggo
|
||||
if (!doVeto)
|
||||
{
|
||||
lg.Factory.Configuration.Variables["codIOB"] = IOBConfFull.General.FilenameIOB;
|
||||
lg.Fatal(message, args);
|
||||
sendToLogWatch("FATAL", message, args);
|
||||
}
|
||||
@@ -184,7 +179,6 @@ namespace IOB_WIN_FORM.Iob
|
||||
// se non ho veto --> loggo
|
||||
if (!doVeto)
|
||||
{
|
||||
lg.Factory.Configuration.Variables["codIOB"] = IOBConfFull.General.FilenameIOB;
|
||||
lg.Fatal(exception, message, args);
|
||||
sendToLogWatch("FATAL", message, exception, args);
|
||||
}
|
||||
@@ -200,7 +194,6 @@ namespace IOB_WIN_FORM.Iob
|
||||
// se non ho veto --> loggo
|
||||
if (!doVeto)
|
||||
{
|
||||
lg.Factory.Configuration.Variables["codIOB"] = IOBConfFull.General.FilenameIOB;
|
||||
lg.Info(message);
|
||||
if (sendToForm)
|
||||
{
|
||||
@@ -220,7 +213,6 @@ namespace IOB_WIN_FORM.Iob
|
||||
// se non ho veto --> loggo
|
||||
if (!doVeto)
|
||||
{
|
||||
lg.Factory.Configuration.Variables["codIOB"] = IOBConfFull.General.FilenameIOB;
|
||||
lg.Info(message, args);
|
||||
sendToLogWatch("INFO", message, args);
|
||||
}
|
||||
@@ -237,7 +229,6 @@ namespace IOB_WIN_FORM.Iob
|
||||
// se non ho veto --> loggo
|
||||
if (!doVeto)
|
||||
{
|
||||
lg.Factory.Configuration.Variables["codIOB"] = IOBConfFull.General.FilenameIOB;
|
||||
DateTime adesso = DateTime.Now;
|
||||
if (adesso.Subtract(DtHelp.lastLogStartup).TotalMinutes > vetoLogStartupDuration)
|
||||
{
|
||||
@@ -266,7 +257,6 @@ namespace IOB_WIN_FORM.Iob
|
||||
// se non ho veto --> loggo
|
||||
if (!doVeto)
|
||||
{
|
||||
lg.Factory.Configuration.Variables["codIOB"] = IOBConfFull.General.FilenameIOB;
|
||||
DateTime adesso = DateTime.Now;
|
||||
if (adesso.Subtract(DtHelp.lastLogStartup).TotalMinutes > vetoLogStartupDuration)
|
||||
{
|
||||
@@ -291,7 +281,6 @@ namespace IOB_WIN_FORM.Iob
|
||||
// se non ho veto --> loggo
|
||||
if (!doVeto)
|
||||
{
|
||||
lg.Factory.Configuration.Variables["codIOB"] = IOBConfFull.General.FilenameIOB;
|
||||
lg.Trace(message);
|
||||
if (sendToForm)
|
||||
{
|
||||
@@ -311,7 +300,6 @@ namespace IOB_WIN_FORM.Iob
|
||||
// se non ho veto --> loggo
|
||||
if (!doVeto)
|
||||
{
|
||||
lg.Factory.Configuration.Variables["codIOB"] = IOBConfFull.General.FilenameIOB;
|
||||
lg.Trace(message, args);
|
||||
sendToLogWatch("TRACE", message, args);
|
||||
}
|
||||
@@ -327,7 +315,6 @@ namespace IOB_WIN_FORM.Iob
|
||||
// se non ho veto --> loggo
|
||||
if (!doVeto)
|
||||
{
|
||||
lg.Factory.Configuration.Variables["codIOB"] = IOBConfFull.General.FilenameIOB;
|
||||
lg.Warn(message);
|
||||
if (sendToForm)
|
||||
{
|
||||
|
||||
@@ -6933,7 +6933,7 @@ namespace IOB_WIN_FORM.Iob
|
||||
{
|
||||
logMsg += $" | {codTav} | {messType} | {message}";
|
||||
}
|
||||
parentForm.taskWatcher = logMsg;
|
||||
parentForm.AddTaskLog(logMsg);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -9114,7 +9114,7 @@ namespace IOB_WIN_FORM.Iob
|
||||
{
|
||||
string codIob = IOBConfFull.General.FilenameIOB;
|
||||
bool useRedis = IOBConfFull.General.EnabRedisQue;
|
||||
if(QHelp.QueueIN!=null) QHelp.QueueIN.Dispose();
|
||||
if (QHelp.QueueIN != null) QHelp.QueueIN.Dispose();
|
||||
QHelp.QueueIN = new DataQueue(codIob, "QueueIN", useRedis, redisMan);
|
||||
if (QHelp.QueueSrvResp != null) QHelp.QueueSrvResp.Dispose();
|
||||
QHelp.QueueSrvResp = new DataQueue(codIob, "QueueServResp", useRedis, redisMan);
|
||||
|
||||
Generated
+1
-1
@@ -233,7 +233,7 @@
|
||||
// MainTimer
|
||||
//
|
||||
this.MainTimer.Enabled = true;
|
||||
this.MainTimer.Interval = 20;
|
||||
this.MainTimer.Interval = 50;
|
||||
this.MainTimer.Tick += new System.EventHandler(this.MainTimer_Tick);
|
||||
//
|
||||
// notifyIcon1
|
||||
|
||||
+58
-21
@@ -11,13 +11,11 @@ using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.NetworkInformation;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Timers;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace IOB_WIN_FORM
|
||||
@@ -26,11 +24,6 @@ namespace IOB_WIN_FORM
|
||||
{
|
||||
#region Public Fields
|
||||
|
||||
/// <summary>
|
||||
/// oggetto logging
|
||||
/// </summary>
|
||||
protected static Logger lg = LogManager.GetCurrentClassLogger();
|
||||
|
||||
/// <summary>
|
||||
/// Configurazione gerarchica completa (v 4.x.x.x)
|
||||
/// </summary>
|
||||
@@ -50,6 +43,7 @@ namespace IOB_WIN_FORM
|
||||
/// </summary>
|
||||
public MainForm(string[] args)
|
||||
{
|
||||
SetIOB("MAIN");
|
||||
// salvo parametri avvio...
|
||||
saveArgs(args);
|
||||
// continuo iNIT!!!
|
||||
@@ -96,7 +90,6 @@ namespace IOB_WIN_FORM
|
||||
// se true --> comunica/verde, altrimenti grigio
|
||||
lblApp.ForeColor = value ? Color.SeaGreen : Color.Black;
|
||||
lblVers.ForeColor = value ? Color.SeaGreen : Color.DarkSlateGray;
|
||||
//statusStrip1.Invalidate();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -219,10 +212,6 @@ namespace IOB_WIN_FORM
|
||||
{
|
||||
resetProgBar++;
|
||||
}
|
||||
#if false
|
||||
// invalido x ridisegnare...
|
||||
MainProgrBar.Invalidate();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
@@ -242,7 +231,6 @@ namespace IOB_WIN_FORM
|
||||
// mostro solo se non minimizzata
|
||||
if (!ShouldUpdateUI()) return;
|
||||
lblStatus.Text = txt2show;
|
||||
//lblStatus.Invalidate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -254,8 +242,8 @@ namespace IOB_WIN_FORM
|
||||
/// <param name="serverOk"></param>
|
||||
public void updateComStats(int numPLC, int numAttivi, bool serverOk)
|
||||
{
|
||||
// testo
|
||||
lblComStats.Text = $"{numAttivi}/{numPLC} PLC --> {MPIP} (MP/IO)";
|
||||
if (!ShouldUpdateUI()) return;
|
||||
|
||||
// colore secondo valori... server !="ND" è ok, PLC > 0 è OK
|
||||
int score = 0;
|
||||
if (serverOk)
|
||||
@@ -268,7 +256,8 @@ namespace IOB_WIN_FORM
|
||||
score++;
|
||||
}
|
||||
|
||||
if (!ShouldUpdateUI()) return;
|
||||
// testo
|
||||
lblComStats.Text = $"{numAttivi}/{numPLC} PLC --> {MPIP} (MP/IO)";
|
||||
switch (score)
|
||||
{
|
||||
case 0:
|
||||
@@ -464,7 +453,6 @@ namespace IOB_WIN_FORM
|
||||
/// <param name="txt2log"></param>
|
||||
protected static void lgError(string txt2log)
|
||||
{
|
||||
lg.Factory.Configuration.Variables["codIOB"] = "MAIN";
|
||||
lg.Error(txt2log);
|
||||
}
|
||||
|
||||
@@ -474,7 +462,6 @@ namespace IOB_WIN_FORM
|
||||
/// <param name="txt2log"></param>
|
||||
protected static void lgInfo(string txt2log)
|
||||
{
|
||||
lg.Factory.Configuration.Variables["codIOB"] = "MAIN";
|
||||
lg.Info(txt2log);
|
||||
}
|
||||
|
||||
@@ -484,7 +471,6 @@ namespace IOB_WIN_FORM
|
||||
/// <param name="txt2log"></param>
|
||||
protected static void lgWarn(string txt2log)
|
||||
{
|
||||
lg.Factory.Configuration.Variables["codIOB"] = "MAIN";
|
||||
lg.Warn(txt2log);
|
||||
}
|
||||
|
||||
@@ -625,6 +611,23 @@ namespace IOB_WIN_FORM
|
||||
base.OnFormClosing(e);
|
||||
}
|
||||
|
||||
protected override void OnVisibleChanged(EventArgs e)
|
||||
{
|
||||
base.OnVisibleChanged(e);
|
||||
|
||||
if (!Visible)
|
||||
{
|
||||
wasHidden = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (wasHidden)
|
||||
{
|
||||
wasHidden = false;
|
||||
OnAppBecameVisible();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Apre la finestra child con conf
|
||||
/// </summary>
|
||||
@@ -684,13 +687,21 @@ namespace IOB_WIN_FORM
|
||||
/// </summary>
|
||||
private static bool closed = false;
|
||||
|
||||
/// <summary>
|
||||
/// oggetto logging
|
||||
/// </summary>
|
||||
private static Logger lg = LogManager.GetCurrentClassLogger();
|
||||
|
||||
private FormWindowState _lastState = FormWindowState.Minimized;
|
||||
private IDisposable _scopeIOB;
|
||||
|
||||
/// <summary>
|
||||
/// Nome applicazione (da app.config)
|
||||
/// </summary>
|
||||
private string nomeApp = "";
|
||||
|
||||
private bool wasHidden = false;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Methods
|
||||
@@ -716,6 +727,8 @@ namespace IOB_WIN_FORM
|
||||
/// </summary>
|
||||
private void checkCom()
|
||||
{
|
||||
if (!ShouldUpdateUI()) return;
|
||||
|
||||
// eseguo update se è passato almeno comCheckTOut secondi da ultimo check...
|
||||
if (DateTime.Now.Subtract(lastComCheck).TotalSeconds > utils.CRI("comCheckTOut"))
|
||||
{
|
||||
@@ -1074,7 +1087,7 @@ namespace IOB_WIN_FORM
|
||||
{
|
||||
try
|
||||
{
|
||||
string logPath = $"{System.AppDomain.CurrentDomain.BaseDirectory}logs\\MAIN\\{DateTime.Today:yyyy-MM-dd}.log";
|
||||
string logPath = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "logs", "MAIN", $"{DateTime.Today:yyyy-MM-dd}.log");
|
||||
Process.Start(logPath);
|
||||
}
|
||||
catch (Exception exc)
|
||||
@@ -1095,6 +1108,19 @@ namespace IOB_WIN_FORM
|
||||
{
|
||||
Show();
|
||||
WindowState = FormWindowState.Normal;
|
||||
Activate();
|
||||
}
|
||||
}
|
||||
|
||||
private void OnAppBecameVisible()
|
||||
{
|
||||
// refresh completo per tutti i child form...
|
||||
foreach (var ChildForm in this.MdiChildren)
|
||||
{
|
||||
if (ChildForm is IForceUpdateUI updatable)
|
||||
{
|
||||
updatable.ForceUpdateUI();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1127,6 +1153,17 @@ namespace IOB_WIN_FORM
|
||||
Hide();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Salvo IOB e scope x NLog management
|
||||
/// </summary>
|
||||
/// <param name="newIOB"></param>
|
||||
private void SetIOB(string newIOB)
|
||||
{
|
||||
_scopeIOB?.Dispose(); // rimuove il vecchio valore
|
||||
|
||||
_scopeIOB = ScopeContext.PushProperty("codIOB", newIOB);
|
||||
}
|
||||
|
||||
private bool ShouldUpdateUI()
|
||||
{
|
||||
// 1. Controlla se la form stessa è minimizzata
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<targets>
|
||||
<target xsi:type="File"
|
||||
name="f_base"
|
||||
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.log"
|
||||
fileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}.log"
|
||||
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true} | ${message}"
|
||||
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.{###}.log"
|
||||
archiveFileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="90"
|
||||
@@ -21,9 +21,9 @@
|
||||
/>
|
||||
<target xsi:type="File"
|
||||
name="f_error"
|
||||
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.log"
|
||||
fileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}_err.log"
|
||||
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true} | ${message}${newline}${exception:format=tostring}"
|
||||
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.{###}.log"
|
||||
archiveFileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}_err.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="90"
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<targets>
|
||||
<target xsi:type="File"
|
||||
name="f_base"
|
||||
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.log"
|
||||
fileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}.log"
|
||||
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true} | ${message}"
|
||||
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.{###}.log"
|
||||
archiveFileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="90"
|
||||
@@ -21,9 +21,9 @@
|
||||
/>
|
||||
<target xsi:type="File"
|
||||
name="f_error"
|
||||
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.log"
|
||||
fileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}_err.log"
|
||||
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true} | ${message}${newline}${exception:format=tostring}"
|
||||
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.{###}.log"
|
||||
archiveFileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}_err.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="90"
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<targets>
|
||||
<target xsi:type="File"
|
||||
name="f_base"
|
||||
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.log"
|
||||
fileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}.log"
|
||||
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true} | ${message}"
|
||||
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.{###}.log"
|
||||
archiveFileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="90"
|
||||
@@ -21,9 +21,9 @@
|
||||
/>
|
||||
<target xsi:type="File"
|
||||
name="f_error"
|
||||
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.log"
|
||||
fileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}_err.log"
|
||||
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true} | ${message}${newline}${exception:format=tostring}"
|
||||
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.{###}.log"
|
||||
archiveFileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}_err.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="90"
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<targets>
|
||||
<target xsi:type="File"
|
||||
name="f_base"
|
||||
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.log"
|
||||
fileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}.log"
|
||||
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true} | ${message}"
|
||||
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.{###}.log"
|
||||
archiveFileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="90"
|
||||
@@ -21,9 +21,9 @@
|
||||
/>
|
||||
<target xsi:type="File"
|
||||
name="f_error"
|
||||
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.log"
|
||||
fileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}_err.log"
|
||||
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true} | ${message}${newline}${exception:format=tostring}"
|
||||
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.{###}.log"
|
||||
archiveFileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}_err.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="90"
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<targets>
|
||||
<target xsi:type="File"
|
||||
name="f_base"
|
||||
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.log"
|
||||
fileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}.log"
|
||||
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true} | ${message}"
|
||||
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.{###}.log"
|
||||
archiveFileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="90"
|
||||
@@ -21,9 +21,9 @@
|
||||
/>
|
||||
<target xsi:type="File"
|
||||
name="f_error"
|
||||
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.log"
|
||||
fileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}_err.log"
|
||||
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true} | ${message}${newline}${exception:format=tostring}"
|
||||
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.{###}.log"
|
||||
archiveFileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}_err.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="90"
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<targets>
|
||||
<target xsi:type="File"
|
||||
name="f_base"
|
||||
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.log"
|
||||
fileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}.log"
|
||||
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true} | ${message}"
|
||||
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.{###}.log"
|
||||
archiveFileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="90"
|
||||
@@ -21,9 +21,9 @@
|
||||
/>
|
||||
<target xsi:type="File"
|
||||
name="f_error"
|
||||
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.log"
|
||||
fileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}_err.log"
|
||||
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true} | ${message}${newline}${exception:format=tostring}"
|
||||
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.{###}.log"
|
||||
archiveFileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}_err.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="90"
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<targets>
|
||||
<target xsi:type="File"
|
||||
name="f_base"
|
||||
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.log"
|
||||
fileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}.log"
|
||||
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true} | ${message}"
|
||||
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.{###}.log"
|
||||
archiveFileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="90"
|
||||
@@ -21,9 +21,9 @@
|
||||
/>
|
||||
<target xsi:type="File"
|
||||
name="f_error"
|
||||
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.log"
|
||||
fileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}_err.log"
|
||||
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true} | ${message}${newline}${exception:format=tostring}"
|
||||
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.{###}.log"
|
||||
archiveFileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}_err.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="90"
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<targets>
|
||||
<target xsi:type="File"
|
||||
name="f_base"
|
||||
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.log"
|
||||
fileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}.log"
|
||||
layout="${longdate} [${uppercase:${level}}] | ${logger:shortName=true} | ${message}"
|
||||
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.{###}.log"
|
||||
archiveFileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="90"
|
||||
@@ -21,9 +21,9 @@
|
||||
/>
|
||||
<target xsi:type="File"
|
||||
name="f_error"
|
||||
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.log"
|
||||
fileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}_err.log"
|
||||
layout="${longdate} [${uppercase:${level}}] | ${logger:shortName=true} | ${message}"
|
||||
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.{###}.log"
|
||||
archiveFileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}_err.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="90"
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<targets>
|
||||
<target xsi:type="File"
|
||||
name="f_base"
|
||||
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.log"
|
||||
fileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}.log"
|
||||
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true} | ${message}"
|
||||
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.{###}.log"
|
||||
archiveFileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="90"
|
||||
@@ -21,9 +21,9 @@
|
||||
/>
|
||||
<target xsi:type="File"
|
||||
name="f_error"
|
||||
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.log"
|
||||
fileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}_err.log"
|
||||
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true} | ${message}${newline}${exception:format=tostring}"
|
||||
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.{###}.log"
|
||||
archiveFileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}_err.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="90"
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<targets>
|
||||
<target xsi:type="File"
|
||||
name="f_base"
|
||||
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.log"
|
||||
fileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}.log"
|
||||
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true} | ${message}"
|
||||
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.{###}.log"
|
||||
archiveFileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="90"
|
||||
@@ -21,9 +21,9 @@
|
||||
/>
|
||||
<target xsi:type="File"
|
||||
name="f_error"
|
||||
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.log"
|
||||
fileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}_err.log"
|
||||
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true} | ${message}${newline}${exception:format=tostring}"
|
||||
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.{###}.log"
|
||||
archiveFileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}_err.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="90"
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<targets>
|
||||
<target xsi:type="File"
|
||||
name="f_base"
|
||||
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.log"
|
||||
fileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}.log"
|
||||
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true} | ${message}"
|
||||
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.{###}.log"
|
||||
archiveFileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="90"
|
||||
@@ -21,9 +21,9 @@
|
||||
/>
|
||||
<target xsi:type="File"
|
||||
name="f_error"
|
||||
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.log"
|
||||
fileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}_err.log"
|
||||
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true} | ${message}${newline}${exception:format=tostring}"
|
||||
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.{###}.log"
|
||||
archiveFileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}_err.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="90"
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<targets>
|
||||
<target xsi:type="File"
|
||||
name="f_base"
|
||||
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.log"
|
||||
fileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}.log"
|
||||
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true} | ${message}"
|
||||
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.{###}.log"
|
||||
archiveFileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="90"
|
||||
@@ -21,9 +21,9 @@
|
||||
/>
|
||||
<target xsi:type="File"
|
||||
name="f_error"
|
||||
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.log"
|
||||
fileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}_err.log"
|
||||
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true} | ${message}${newline}${exception:format=tostring}"
|
||||
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.{###}.log"
|
||||
archiveFileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}_err.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="90"
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<targets>
|
||||
<target xsi:type="File"
|
||||
name="f_base"
|
||||
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.log"
|
||||
fileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}.log"
|
||||
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true} | ${message}"
|
||||
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.{###}.log"
|
||||
archiveFileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="90"
|
||||
@@ -21,9 +21,9 @@
|
||||
/>
|
||||
<target xsi:type="File"
|
||||
name="f_error"
|
||||
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.log"
|
||||
fileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}_err.log"
|
||||
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true} | ${message}${newline}${exception:format=tostring}"
|
||||
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.{###}.log"
|
||||
archiveFileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}_err.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="90"
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<targets>
|
||||
<target xsi:type="File"
|
||||
name="f_base"
|
||||
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.log"
|
||||
fileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}.log"
|
||||
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true} | ${message}"
|
||||
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.{###}.log"
|
||||
archiveFileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="90"
|
||||
@@ -21,9 +21,9 @@
|
||||
/>
|
||||
<target xsi:type="File"
|
||||
name="f_error"
|
||||
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.log"
|
||||
fileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}_err.log"
|
||||
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true} | ${message}${newline}${exception:format=tostring}"
|
||||
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.{###}.log"
|
||||
archiveFileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}_err.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="90"
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<targets>
|
||||
<target xsi:type="File"
|
||||
name="f_base"
|
||||
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.log"
|
||||
fileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}.log"
|
||||
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true} | ${message}"
|
||||
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.{###}.log"
|
||||
archiveFileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="90"
|
||||
@@ -21,9 +21,9 @@
|
||||
/>
|
||||
<target xsi:type="File"
|
||||
name="f_error"
|
||||
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.log"
|
||||
fileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}_err.log"
|
||||
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true} | ${message}${newline}${exception:format=tostring}"
|
||||
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.{###}.log"
|
||||
archiveFileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}_err.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="90"
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<targets>
|
||||
<target xsi:type="File"
|
||||
name="f_base"
|
||||
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.log"
|
||||
fileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}.log"
|
||||
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true} | ${message}"
|
||||
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.{###}.log"
|
||||
archiveFileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="90"
|
||||
@@ -21,9 +21,9 @@
|
||||
/>
|
||||
<target xsi:type="File"
|
||||
name="f_error"
|
||||
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.log"
|
||||
fileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}_err.log"
|
||||
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true} | ${message}${newline}${exception:format=tostring}"
|
||||
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.{###}.log"
|
||||
archiveFileName="${logDir}/${scopeproperty:codIOB:default=0000}/${shortdate}_err.{###}.log"
|
||||
archiveNumbering="Sequence"
|
||||
archiveAboveSize="10240000"
|
||||
maxArchiveFiles="90"
|
||||
|
||||
Reference in New Issue
Block a user