Skip to content

Commit 7d9a9fa

Browse files
Add logs
1 parent 61b59a2 commit 7d9a9fa

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

Packages/UGF.Module.Authentication/Runtime/AuthenticationModule.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using UGF.Application.Runtime;
2+
using UGF.Logs.Runtime;
23

34
namespace UGF.Module.Authentication.Runtime
45
{
@@ -12,6 +13,8 @@ protected AuthenticationModule(TDescription description, IApplication applicatio
1213

1314
public void SignOut()
1415
{
16+
Log.Debug("Authentication signing out.");
17+
1518
OnSignOut();
1619
}
1720

Packages/UGF.Module.Authentication/Runtime/Unity/AuthenticationUnityModule.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System.Threading.Tasks;
22
using UGF.Application.Runtime;
3+
using UGF.Logs.Runtime;
34
using UGF.Module.Services.Runtime;
45
using UGF.Module.Services.Runtime.Unity;
56
using Unity.Services.Authentication;
@@ -36,6 +37,8 @@ protected override async Task OnInitializeAsync()
3637
CreateAccount = Description.SignAnonymousDescription.CreateAccount
3738
};
3839

40+
Log.Debug("Authentication Unity signing anonymously.");
41+
3942
await Service.SignInAnonymouslyAsync(options);
4043
}
4144
}
@@ -55,13 +58,23 @@ protected override bool OnIsSigned()
5558
protected override void OnSignOut()
5659
{
5760
Service.SignOut(Description.ClearCredentialsOnSignOut);
61+
62+
Log.Debug("Authentication Unity signed out", new
63+
{
64+
Description.ClearCredentialsOnSignOut
65+
});
5866
}
5967

6068
private void OnConfiguringOptions(InitializationOptions options)
6169
{
6270
if (Description.HasProfile)
6371
{
6472
options.SetProfile(Description.Profile);
73+
74+
Log.Debug("Authentication Unity setup profile", new
75+
{
76+
Description.Profile
77+
});
6578
}
6679
}
6780
}

0 commit comments

Comments
 (0)