Trace view model was changed
This commit is contained in:
@@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Loggers
|
||||
namespace StructureHelperCommon.Models
|
||||
{
|
||||
public class ShiftTraceLogger : IShiftTraceLogger
|
||||
{
|
||||
@@ -17,10 +17,10 @@ namespace StructureHelperCommon.Models.Loggers
|
||||
Logger = logger;
|
||||
}
|
||||
public ShiftTraceLogger() : this(new TraceLogger()) { }
|
||||
public void AddMessage(string message, TraceLoggerStatuses status = TraceLoggerStatuses.Info, int shiftPrioriry = 0)
|
||||
public void AddMessage(string message, TraceLogStatuses status = TraceLogStatuses.Info, int shiftPrioriry = 0)
|
||||
{
|
||||
// if status in (fatal, error, warning) they must be kept as they are
|
||||
if (status <= TraceLoggerStatuses.Warning)
|
||||
if (status <= TraceLogStatuses.Warning)
|
||||
{
|
||||
Logger.AddMessage(message, status);
|
||||
}
|
||||
@@ -48,7 +48,10 @@ namespace StructureHelperCommon.Models.Loggers
|
||||
|
||||
public void AddEntry(ITraceLoggerEntry loggerEntry)
|
||||
{
|
||||
loggerEntry.Priority += ShiftPriority;
|
||||
if (loggerEntry.Priority >= LoggerService.GetPriorityByStatus(TraceLogStatuses.Warning))
|
||||
{
|
||||
loggerEntry.Priority += ShiftPriority;
|
||||
}
|
||||
Logger.TraceLoggerEntries.Add(loggerEntry);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user