diff options
Diffstat (limited to 'slips/src/app/Marina/Infrastructure/Logging/Interfaces')
3 files changed, 28 insertions, 0 deletions
diff --git a/slips/src/app/Marina/Infrastructure/Logging/Interfaces/ILog.cs b/slips/src/app/Marina/Infrastructure/Logging/Interfaces/ILog.cs new file mode 100644 index 0000000..37d91d8 --- /dev/null +++ b/slips/src/app/Marina/Infrastructure/Logging/Interfaces/ILog.cs @@ -0,0 +1,7 @@ +namespace Marina.Infrastructure.Logging.Interfaces {
+ public interface ILog {
+ void Informational( string message );
+ void Informational( string messageFormat, params object[] args );
+ void CriticalError( string messageFormat, params object[] args );
+ }
+}
\ No newline at end of file diff --git a/slips/src/app/Marina/Infrastructure/Logging/Interfaces/ILogFactory.cs b/slips/src/app/Marina/Infrastructure/Logging/Interfaces/ILogFactory.cs new file mode 100644 index 0000000..0c71caf --- /dev/null +++ b/slips/src/app/Marina/Infrastructure/Logging/Interfaces/ILogFactory.cs @@ -0,0 +1,7 @@ +using System;
+
+namespace Marina.Infrastructure.Logging.Interfaces {
+ public interface ILogFactory {
+ ILog CreateFor( Type type );
+ }
+}
\ No newline at end of file diff --git a/slips/src/app/Marina/Infrastructure/Logging/Interfaces/Log.cs b/slips/src/app/Marina/Infrastructure/Logging/Interfaces/Log.cs new file mode 100644 index 0000000..c8dae76 --- /dev/null +++ b/slips/src/app/Marina/Infrastructure/Logging/Interfaces/Log.cs @@ -0,0 +1,14 @@ +using System;
+using Marina.Infrastructure.Container;
+
+namespace Marina.Infrastructure.Logging.Interfaces {
+ public class Log {
+ public static ILog For( object itemThatRequiresLoggingServices ) {
+ return For( itemThatRequiresLoggingServices.GetType( ) );
+ }
+
+ public static ILog For( Type type ) {
+ return Resolve.DependencyFor< ILogFactory >( ).CreateFor( type );
+ }
+ }
+}
\ No newline at end of file |
