integración nueva tabla
This commit is contained in:
parent
5db07294f9
commit
657fd50ac9
22 changed files with 203 additions and 447 deletions
39
SHARED/Helper/ConsoleLoggerHelper.cs
Normal file
39
SHARED/Helper/ConsoleLoggerHelper.cs
Normal file
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
|
||||
namespace Shared.Helper
|
||||
{
|
||||
public static class ConsoleLoggerHelper
|
||||
{
|
||||
public static void WriteLineAndLogInfo(string msj, ConsoleColor? color = null)
|
||||
{
|
||||
if (color.HasValue && Enum.IsDefined(typeof(ConsoleColor), color.Value))
|
||||
{
|
||||
Console.ForegroundColor = color.Value;
|
||||
Console.WriteLine(msj);
|
||||
Console.ResetColor();
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine(msj);
|
||||
}
|
||||
|
||||
FileLoggerHelper.LogInformation(msj);
|
||||
}
|
||||
|
||||
public static void WriteLineAndLogEventoAsync(string evento, string proceso, string operacion = "", ConsoleColor? color = null)
|
||||
{
|
||||
if (color.HasValue && Enum.IsDefined(typeof(ConsoleColor), color.Value))
|
||||
{
|
||||
Console.ForegroundColor = color.Value;
|
||||
Console.WriteLine(proceso);
|
||||
Console.ResetColor();
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine(proceso);
|
||||
}
|
||||
|
||||
FileLoggerHelper.LogInformation(proceso);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue