Skip to content

Commit

Permalink
feature: Added AppCenter Secret in LoggingModule constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
RLittlesII committed Jan 13, 2020
1 parent 9ede91c commit e0e9e5b
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion src/Composition/LoggingModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,31 @@ namespace Rocket.Surgery.Airframe.Composition
/// </summary>
public class LoggingModule : DryIocModule
{
private readonly string _appCenterSecret;

/// <summary>
/// Initializes a new instance of the <see cref="LoggingModule"/> class.
/// </summary>
public LoggingModule()
: this(string.Empty)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="LoggingModule"/> class.
/// </summary>
/// <param name="appCenterSecret">The app center secret.</param>
public LoggingModule(string appCenterSecret)
{
_appCenterSecret = appCenterSecret;
}

/// <inheritdoc />
public override void Load(IRegistrator registrar)
{
Log.Logger = new LoggerConfiguration()
.WriteTo
.AppCenterCrashes()
.AppCenterCrashes(_appCenterSecret)
.CreateLogger();

var funcLogManager = new FuncLogManager(type =>
Expand Down

0 comments on commit e0e9e5b

Please sign in to comment.