Skip to content

Commit

Permalink
Merge pull request #10 from bernarden/feature/renaming-interfaces
Browse files Browse the repository at this point in the history
Ranames ILogger to IAbstractLogger. Other logger classes and interfac…
  • Loading branch information
bernarden authored Mar 21, 2018
2 parents 9972a25 + 667e145 commit 3558b4a
Show file tree
Hide file tree
Showing 16 changed files with 46 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ namespace Vima.LoggingAbstractor.AppInsights
/// <summary>
/// Represents an instance of an Application Insights logger.
/// </summary>
/// <seealso cref="Vima.LoggingAbstractor.Core.LoggerBase" />
/// <seealso cref="Vima.LoggingAbstractor.AppInsights.IAppInsightsLogger" />
public class AppInsightsLogger : LoggerBase, IAppInsightsLogger
/// <seealso cref="AbstractLoggerBase" />
/// <seealso cref="IAppInsightsAbstractLogger" />
public class AppInsightsAbstractLogger : AbstractLoggerBase, IAppInsightsAbstractLogger
{
private readonly TelemetryClient _telemetryClient;

/// <summary>
/// Initializes a new instance of the <see cref="AppInsightsLogger"/> class.
/// Initializes a new instance of the <see cref="AppInsightsAbstractLogger"/> class.
/// </summary>
/// <param name="telemetryClient">The Application Insights client.</param>
/// <param name="minimalLoggingLevel">The minimal logging level.</param>
public AppInsightsLogger(TelemetryClient telemetryClient, LoggingLevel minimalLoggingLevel = LoggingLevel.Verbose)
public AppInsightsAbstractLogger(TelemetryClient telemetryClient, LoggingLevel minimalLoggingLevel = LoggingLevel.Verbose)
: base(minimalLoggingLevel)
{
_telemetryClient = telemetryClient ?? throw new ArgumentNullException(nameof(telemetryClient));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ namespace Vima.LoggingAbstractor.AppInsights
/// <summary>
/// Represents an instance of an Application Insights logger.
/// </summary>
/// <seealso cref="Vima.LoggingAbstractor.Core.ILogger" />
public interface IAppInsightsLogger : ILogger
/// <seealso cref="IAbstractLogger" />
public interface IAppInsightsAbstractLogger : IAbstractLogger
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ namespace Vima.LoggingAbstractor.Console
/// <summary>
/// Represents an instance of a logger that logs everything to a console.
/// </summary>
/// <seealso cref="Vima.LoggingAbstractor.Console.IConsoleLogger" />
public class ConsoleLogger : LoggerBase, IConsoleLogger
/// <seealso cref="IConsoleAbstractLogger" />
public class ConsoleAbstractLogger : AbstractLoggerBase, IConsoleAbstractLogger
{
/// <summary>
/// Initializes a new instance of the <see cref="ConsoleLogger"/> class.
/// Initializes a new instance of the <see cref="ConsoleAbstractLogger"/> class.
/// </summary>
/// <param name="minimalLoggingLevel">The minimal logging level.</param>
public ConsoleLogger(LoggingLevel minimalLoggingLevel = LoggingLevel.Verbose)
public ConsoleAbstractLogger(LoggingLevel minimalLoggingLevel = LoggingLevel.Verbose)
: base(minimalLoggingLevel)
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ namespace Vima.LoggingAbstractor.Console
/// <summary>
/// Represents an instance of a logger that logs everything to a console.
/// </summary>
/// <seealso cref="Vima.LoggingAbstractor.Core.ILogger" />
public interface IConsoleLogger : ILogger
/// <seealso cref="IAbstractLogger" />
public interface IConsoleAbstractLogger : IAbstractLogger
{
}
}
4 changes: 2 additions & 2 deletions Source/Vima.LoggingAbstractor.Core.Tests/LoggerBaseTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ public void ShouldReturnCorrectValueInAllCombinationsOfInputs()
foreach (var currentLoggingLevel in loggingLevels)
{
// Arrange
TestLoggerBase loggerBase = new TestLoggerBase(minimalLoggingLevel);
TestAbstractLoggerBase abstractLoggerBase = new TestAbstractLoggerBase(minimalLoggingLevel);
var expectedResult = ShouldClientLogTrace(minimalLoggingLevel, currentLoggingLevel);

// Act
var result = loggerBase.ShouldBeTraced(currentLoggingLevel);
var result = abstractLoggerBase.ShouldBeTraced(currentLoggingLevel);

// Assert
result.Should().Be(expectedResult, $"current logging level is '{currentLoggingLevel:G}' and minimal logging level is '{minimalLoggingLevel.ToString()}'");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

namespace Vima.LoggingAbstractor.Core.Tests
{
public class TestLoggerBase : LoggerBase
public class TestAbstractLoggerBase : AbstractLoggerBase
{
public TestLoggerBase(LoggingLevel minimalLoggingLevel = LoggingLevel.Verbose)
public TestAbstractLoggerBase(LoggingLevel minimalLoggingLevel = LoggingLevel.Verbose)
: base(minimalLoggingLevel)
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ namespace Vima.LoggingAbstractor.Core
/// <summary>
/// Represents an instance of a logger.
/// </summary>
public abstract class LoggerBase : ILogger
public abstract class AbstractLoggerBase : IAbstractLogger
{
private readonly LoggingLevel _minimalLoggingLevel;

/// <summary>
/// Initializes a new instance of the <see cref="LoggerBase"/> class.
/// Initializes a new instance of the <see cref="AbstractLoggerBase"/> class.
/// </summary>
/// <param name="minimalLoggingLevel">The minimal logging level.</param>
protected LoggerBase(LoggingLevel minimalLoggingLevel)
protected AbstractLoggerBase(LoggingLevel minimalLoggingLevel)
{
_minimalLoggingLevel = minimalLoggingLevel;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Vima.LoggingAbstractor.Core
/// <summary>
/// Represents an instance of a logger.
/// </summary>
public interface ILogger
public interface IAbstractLogger
{
/// <summary>
/// Traces the message.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
/// <summary>
/// Responsible for combining multiple loggers at the same time.
/// </summary>
/// <seealso cref="Vima.LoggingAbstractor.Core.ILogger" />
public interface IMultiLogger : ILogger
/// <seealso cref="IAbstractLogger" />
public interface IMultiAbstractLogger : IAbstractLogger
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ namespace Vima.LoggingAbstractor.Core.MultiLogger
/// <summary>
/// Responsible for combining multiple loggers at the same time.
/// </summary>
/// <seealso cref="Vima.LoggingAbstractor.Core.MultiLogger.IMultiLogger" />
public class MultiLogger : IMultiLogger
/// <seealso cref="IMultiAbstractLogger" />
public class MultiAbstractLogger : IMultiAbstractLogger
{
private readonly IEnumerable<ILogger> _loggers;
private readonly IEnumerable<IAbstractLogger> _loggers;

/// <summary>
/// Initializes a new instance of the <see cref="MultiLogger"/> class.
/// Initializes a new instance of the <see cref="MultiAbstractLogger"/> class.
/// </summary>
/// <param name="loggers">The loggers used to trace events.</param>
public MultiLogger(IEnumerable<ILogger> loggers)
public MultiAbstractLogger(IEnumerable<IAbstractLogger> loggers)
{
_loggers = loggers ?? throw new ArgumentNullException(nameof(loggers));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
/// <summary>
/// Represents an instance of a logger that performs no operations.
/// </summary>
/// <seealso cref="Vima.LoggingAbstractor.Core.ILogger" />
public interface INoOpLogger : ILogger
/// <seealso cref="IAbstractLogger" />
public interface INoOpAbstractLogger : IAbstractLogger
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ namespace Vima.LoggingAbstractor.Core.NoOpLogger
/// <summary>
/// Represents an instance of a logger that performs no operations.
/// </summary>
/// <seealso cref="Vima.LoggingAbstractor.Core.NoOpLogger.INoOpLogger" />
public class NoOpLogger : INoOpLogger
/// <seealso cref="INoOpAbstractLogger" />
public class NoOpAbstractLogger : INoOpAbstractLogger
{
/// <summary>
/// Traces the message.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ namespace Vima.LoggingAbstractor.Raygun
/// <summary>
/// Represents an instance of a Raygun logger.
/// </summary>
/// <seealso cref="Vima.LoggingAbstractor.Core.ILogger" />
public interface IRaygunLogger : ILogger
/// <seealso cref="IAbstractLogger" />
public interface IRaygunAbstractLogger : IAbstractLogger
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ namespace Vima.LoggingAbstractor.Raygun
/// <summary>
/// Represents an instance of a Raygun logger.
/// </summary>
/// <seealso cref="Vima.LoggingAbstractor.Core.LoggerBase" />
/// <seealso cref="Vima.LoggingAbstractor.Raygun.IRaygunLogger" />
public class RaygunLogger : LoggerBase, IRaygunLogger
/// <seealso cref="AbstractLoggerBase" />
/// <seealso cref="IRaygunAbstractLogger" />
public class RaygunAbstractLogger : AbstractLoggerBase, IRaygunAbstractLogger
{
private readonly RaygunClient _raygunClient;

/// <summary>
/// Initializes a new instance of the <see cref="RaygunLogger"/> class.
/// Initializes a new instance of the <see cref="RaygunAbstractLogger"/> class.
/// </summary>
/// <param name="raygunClient">The raygun client.</param>
/// <param name="minimalLoggingLevel">The minimal logging level.</param>
public RaygunLogger(RaygunClient raygunClient, LoggingLevel minimalLoggingLevel = LoggingLevel.Verbose)
public RaygunAbstractLogger(RaygunClient raygunClient, LoggingLevel minimalLoggingLevel = LoggingLevel.Verbose)
: base(minimalLoggingLevel)
{
_raygunClient = raygunClient ?? throw new ArgumentNullException(nameof(raygunClient));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ namespace Vima.LoggingAbstractor.Sentry
/// <summary>
/// Represents an instance of a Sentry logger.
/// </summary>
/// <seealso cref="Vima.LoggingAbstractor.Core.ILogger" />
public interface ISentryLogger : ILogger
/// <seealso cref="IAbstractLogger" />
public interface ISentryAbstractLogger : IAbstractLogger
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ namespace Vima.LoggingAbstractor.Sentry
/// <summary>
/// Represents an instance of a Sentry logger.
/// </summary>
/// <seealso cref="Vima.LoggingAbstractor.Core.LoggerBase" />
/// <seealso cref="Vima.LoggingAbstractor.Sentry.ISentryLogger" />
public class SentryLogger : LoggerBase, ISentryLogger
/// <seealso cref="AbstractLoggerBase" />
/// <seealso cref="ISentryAbstractLogger" />
public class SentryAbstractLogger : AbstractLoggerBase, ISentryAbstractLogger
{
private readonly RavenClient _ravenClient;

/// <summary>
/// Initializes a new instance of the <see cref="SentryLogger"/> class.
/// Initializes a new instance of the <see cref="SentryAbstractLogger"/> class.
/// </summary>
/// <param name="ravenClient">The raven client.</param>
/// <param name="minimalLoggingLevel">The minimal logging level.</param>
public SentryLogger(RavenClient ravenClient, LoggingLevel minimalLoggingLevel = LoggingLevel.Verbose)
public SentryAbstractLogger(RavenClient ravenClient, LoggingLevel minimalLoggingLevel = LoggingLevel.Verbose)
: base(minimalLoggingLevel)
{
_ravenClient = ravenClient ?? throw new ArgumentNullException(nameof(ravenClient));
Expand Down

0 comments on commit 3558b4a

Please sign in to comment.