feat: se agregan logs, y se hacen cambios en el modulo registrar mediciones
This commit is contained in:
parent
5bd9c2a1a6
commit
4b6204d9e7
32 changed files with 648 additions and 625 deletions
|
@ -3,27 +3,27 @@ using Serilog;
|
|||
|
||||
namespace Shared.Helper
|
||||
{
|
||||
public class FileLoggerHelper
|
||||
{
|
||||
public static void ConfigureLogger(IConfiguration configuration)
|
||||
public class FileLoggerHelper
|
||||
{
|
||||
var logFilePath = configuration.GetSection("Logging:LogFile:Path").Value;
|
||||
var logFileFullPath = Path.Combine(Directory.GetCurrentDirectory(), logFilePath);
|
||||
public static void ConfigureLogger(IConfiguration configuration)
|
||||
{
|
||||
var logFilePath = configuration.GetSection("Logging:LogFile:Path").Value;
|
||||
var logFileFullPath = Path.Combine(Directory.GetCurrentDirectory(), logFilePath);
|
||||
|
||||
Log.Logger = new LoggerConfiguration()
|
||||
.ReadFrom.Configuration(configuration)
|
||||
.WriteTo.File(logFileFullPath, rollingInterval: RollingInterval.Day)
|
||||
.CreateLogger();
|
||||
}
|
||||
Log.Logger = new LoggerConfiguration()
|
||||
.ReadFrom.Configuration(configuration)
|
||||
.WriteTo.File(logFileFullPath, rollingInterval: RollingInterval.Day)
|
||||
.CreateLogger();
|
||||
}
|
||||
|
||||
public static void LogInformation(string message)
|
||||
{
|
||||
Log.Information($"{message}");
|
||||
}
|
||||
public static void LogInformation(string message)
|
||||
{
|
||||
Log.Information($"{message}");
|
||||
}
|
||||
|
||||
public static void LogError(string message, Exception ex)
|
||||
{
|
||||
Log.Error(ex, message);
|
||||
public static void LogError(string message, Exception ex)
|
||||
{
|
||||
Log.Error(ex, message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue