remove old references and remove unnecessary code
This commit is contained in:
		| @@ -1,50 +0,0 @@ | ||||
| using Core.Blueprint.DAL.Logs.Contracts; | ||||
| using Serilog; | ||||
|  | ||||
| namespace Core.Blueprint.DAL.Logs | ||||
| { | ||||
|     public class BlueprintSerilogLogger : IBlueprintSerilogLogger | ||||
|     { | ||||
|         private readonly ILogger logger; | ||||
|  | ||||
|         public BlueprintSerilogLogger(ILogger logger) | ||||
|         { | ||||
|             this.logger = logger; | ||||
|         } | ||||
|  | ||||
|         public void LogInformation(string service, params object[] args) | ||||
|         { | ||||
|             logger.Information("Starting operation in {service} service", service, args); | ||||
|         } | ||||
|  | ||||
|         public void LogOperationStarted(string service, params object[] args) | ||||
|         { | ||||
|             logger.Information("Starting operation in {Service} service with parameters: {@Args}", service, args); | ||||
|         } | ||||
|         public void LogOperationFinished(string service, params object[] args) | ||||
|         { | ||||
|             logger.Information("Finishing operation in {Service} service with parameters: {@Args}", service, args); | ||||
|         } | ||||
|  | ||||
|         public void LogInformation(string message) | ||||
|         { | ||||
|             logger.Information(message); | ||||
|         } | ||||
|  | ||||
|         public void LogWarning(string message, params object[] args) | ||||
|         { | ||||
|             logger.Warning(message, args); | ||||
|         } | ||||
|  | ||||
|         public void LogError(string service, params object[] args) | ||||
|         { | ||||
|             logger.Error("An error occurred in `{service}` Exception: {@Args}", service, args); | ||||
|         } | ||||
|  | ||||
|         public void LogCritical(Exception exception, string message, params object[] args) | ||||
|         { | ||||
|             logger.Fatal(exception, message, args); | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  | ||||
| @@ -1,15 +0,0 @@ | ||||
| using Core.Blueprint.DAL.Logs.Contracts; | ||||
| using Microsoft.Extensions.DependencyInjection; | ||||
|  | ||||
| namespace Core.Blueprint.DAL.Logs.Configuration | ||||
| { | ||||
|     public static class LogExtensionConfiguration | ||||
|     { | ||||
|         public static IServiceCollection AddLogLayer(this IServiceCollection services) | ||||
|         { | ||||
|             services.AddScoped<IBlueprintSerilogLogger, BlueprintSerilogLogger>(); | ||||
|  | ||||
|             return services; | ||||
|         } | ||||
|     } | ||||
| } | ||||
| @@ -1,9 +0,0 @@ | ||||
| namespace Core.Blueprint.DAL.Logs.Contracts | ||||
| { | ||||
|     public interface IBlueprintLogger<T> where T : class, new() | ||||
|     { | ||||
|         //logger | ||||
|         //serilog... | ||||
|         //patterns of structuie logging | ||||
|     } | ||||
| } | ||||
| @@ -1,12 +0,0 @@ | ||||
| namespace Core.Blueprint.DAL.Logs.Contracts | ||||
| { | ||||
|     public interface IBlueprintSerilogLogger | ||||
|     { | ||||
|         public void LogInformation(string service, params object[] args); | ||||
|         public void LogOperationStarted(string service, params object[] args); | ||||
|         public void LogOperationFinished(string service, params object[] args); | ||||
|         public void LogWarning(string message, params object[] args); | ||||
|         public void LogError(string servicee, params object[] args); | ||||
|         public void LogCritical(Exception exception, string message, params object[] args); | ||||
|     } | ||||
| } | ||||
| @@ -1,24 +0,0 @@ | ||||
| namespace Core.Blueprint.DAL.Logs; | ||||
| public static partial class Log | ||||
| { | ||||
|     //[LoggerMessage( | ||||
|     //    EventId = 1, | ||||
|     //    Level = LogLevel.Information, | ||||
|     //    Message = "Starting operation in`{service}` service with parameters: {@Args}" | ||||
|     //)] | ||||
|     //static partial void OperationStarted(ILogger logger, string service, params object[] args); | ||||
|  | ||||
|     //[LoggerMessage( | ||||
|     //    EventId = 1, | ||||
|     //    Level = LogLevel.Information, | ||||
|     //    Message = "Operation finished in`{service}` service with parameters: {@Args}" | ||||
|     //)] | ||||
|     //static partial void OperationFinished(ILogger logger, string service, params object[] args); | ||||
|  | ||||
|     //[LoggerMessage( | ||||
|     //    EventId = 2, | ||||
|     //    Level = LogLevel.Error, | ||||
|     //    Message = "An error occurred in `{service}` service" | ||||
|     //)] | ||||
|     //static partial void OperationFailed(ILogger logger, string service, Exception exception); | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 Sergio Matias Urquin
					Sergio Matias Urquin