diff --git a/GBase.Logging/ConsoleLogger.cs b/GBase.Logging/ConsoleLogger.cs index f285376..4b23822 100644 --- a/GBase.Logging/ConsoleLogger.cs +++ b/GBase.Logging/ConsoleLogger.cs @@ -11,7 +11,7 @@ namespace GBase.Logging /// /// An that writes log messages to the /// - public class ConsoleLogger : ILogger + public class ConsoleLogger : IConsoleLogger { /// /// Write the given to the diff --git a/GBase.Logging/Factories/IConsoleLoggerFactory.cs b/GBase.Logging/Factories/IConsoleLoggerFactory.cs new file mode 100644 index 0000000..18a2f30 --- /dev/null +++ b/GBase.Logging/Factories/IConsoleLoggerFactory.cs @@ -0,0 +1,14 @@ +// Author: Gockner, Simon +// Created: 2020-02-12 +// Copyright(c) 2020 SimonG. All Rights Reserved. + + +using GBase.Logging.Interfaces; + +namespace GBase.Logging.Factories +{ + public interface IConsoleLoggerFactory + { + IConsoleLogger Create(); + } +} \ No newline at end of file diff --git a/GBase.Logging/Factories/IFileLoggerFactory.cs b/GBase.Logging/Factories/IFileLoggerFactory.cs new file mode 100644 index 0000000..c1b1b40 --- /dev/null +++ b/GBase.Logging/Factories/IFileLoggerFactory.cs @@ -0,0 +1,14 @@ +// Author: Gockner, Simon +// Created: 2020-02-12 +// Copyright(c) 2020 SimonG. All Rights Reserved. + + +using GBase.Logging.Interfaces; + +namespace GBase.Logging.Factories +{ + public interface IFileLoggerFactory + { + IFileLogger Create(string filePath, string fileName); + } +} \ No newline at end of file diff --git a/GBase.Logging/Factories/ILogFactory.cs b/GBase.Logging/Factories/ILogFactory.cs new file mode 100644 index 0000000..dc9d0b4 --- /dev/null +++ b/GBase.Logging/Factories/ILogFactory.cs @@ -0,0 +1,14 @@ +// Author: Gockner, Simon +// Created: 2020-02-12 +// Copyright(c) 2020 SimonG. All Rights Reserved. + + +using GBase.Logging.Interfaces; + +namespace GBase.Logging.Factories +{ + public interface ILogFactory + { + ILog Create(); + } +} \ No newline at end of file diff --git a/GBase.Logging/FileLogger.cs b/GBase.Logging/FileLogger.cs index f7b1ab7..ddf888d 100644 --- a/GBase.Logging/FileLogger.cs +++ b/GBase.Logging/FileLogger.cs @@ -12,7 +12,7 @@ namespace GBase.Logging /// /// An that writes log messages to a set file /// - public class FileLogger : ILogger + public class FileLogger : IFileLogger { private readonly StreamWriter _fileWriter; private readonly Timer _timer; diff --git a/GBase.Logging/GBase.Logging.csproj b/GBase.Logging/GBase.Logging.csproj index d4c395e..0e7e514 100644 --- a/GBase.Logging/GBase.Logging.csproj +++ b/GBase.Logging/GBase.Logging.csproj @@ -4,4 +4,8 @@ netstandard2.1 + + + + diff --git a/GBase.Logging/Installers/LoggingInstaller.cs b/GBase.Logging/Installers/LoggingInstaller.cs new file mode 100644 index 0000000..66b146b --- /dev/null +++ b/GBase.Logging/Installers/LoggingInstaller.cs @@ -0,0 +1,27 @@ +// Author: Gockner, Simon +// Created: 2020-02-12 +// Copyright(c) 2020 SimonG. All Rights Reserved. + + +using GBase.Logging.Factories; +using GBase.Logging.Interfaces; +using LightweightIocContainer.Interfaces; +using LightweightIocContainer.Interfaces.Installers; + +namespace GBase.Logging.Installers +{ + public class LoggingInstaller : IIocInstaller + { + public void Install(IIocContainer container) + { + container.Register(); + container.Register(); + container.Register(); + + //factories + container.RegisterFactory(); + container.RegisterFactory(); + container.RegisterFactory(); + } + } +} \ No newline at end of file diff --git a/GBase.Logging/Interfaces/IConsoleLogger.cs b/GBase.Logging/Interfaces/IConsoleLogger.cs new file mode 100644 index 0000000..201ff6b --- /dev/null +++ b/GBase.Logging/Interfaces/IConsoleLogger.cs @@ -0,0 +1,11 @@ +// Author: Gockner, Simon +// Created: 2020-02-12 +// Copyright(c) 2020 SimonG. All Rights Reserved. + +namespace GBase.Logging.Interfaces +{ + public interface IConsoleLogger : ILogger + { + + } +} \ No newline at end of file diff --git a/GBase.Logging/Interfaces/IFileLogger.cs b/GBase.Logging/Interfaces/IFileLogger.cs new file mode 100644 index 0000000..a0cd623 --- /dev/null +++ b/GBase.Logging/Interfaces/IFileLogger.cs @@ -0,0 +1,11 @@ +// Author: Gockner, Simon +// Created: 2020-02-12 +// Copyright(c) 2020 SimonG. All Rights Reserved. + +namespace GBase.Logging.Interfaces +{ + public interface IFileLogger : ILogger + { + + } +} \ No newline at end of file