Skip to content

Commit

Permalink
Refactor logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Lacyway committed Oct 24, 2024
1 parent c74483a commit d95f1d3
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions Fika.Core/Coop/Components/CoopHalloweenEventManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Fika.Core.Coop.Components
{
internal class CoopHalloweenEventManager : MonoBehaviour
{
ManualLogSource Logger;
private ManualLogSource logger;

private Action summonStartedAction;
private Action syncStateEvent;
Expand All @@ -21,12 +21,12 @@ internal class CoopHalloweenEventManager : MonoBehaviour

protected void Awake()
{
Logger = BepInEx.Logging.Logger.CreateLogSource("CoopHalloweenEventManager");
logger = BepInEx.Logging.Logger.CreateLogSource("CoopHalloweenEventManager");
}

protected void Start()
{
Logger.LogInfo("Initializing");
logger.LogInfo("Initializing CoopHalloweenEventManager");

server = Singleton<FikaServer>.Instance;

Expand All @@ -37,7 +37,9 @@ protected void Start()

private void OnHalloweenSummonStarted(HalloweenSummonStartedEvent summonStartedEvent)
{
Logger.LogDebug("OnHalloweenSummonStarted");
#if DEBUG
Logger.LogWarning("OnHalloweenSummonStarted");

Check failure on line 41 in Fika.Core/Coop/Components/CoopHalloweenEventManager.cs

View workflow job for this annotation

GitHub Actions / test

'Logger' is an ambiguous reference between 'BepInEx.Logging.Logger' and 'UnityEngine.Logger'

Check failure on line 41 in Fika.Core/Coop/Components/CoopHalloweenEventManager.cs

View workflow job for this annotation

GitHub Actions / test

'Logger' is an ambiguous reference between 'BepInEx.Logging.Logger' and 'UnityEngine.Logger'
#endif

HalloweenEventPacket packet = new(EHalloweenPacketType.Summon)
{
Expand All @@ -49,7 +51,9 @@ private void OnHalloweenSummonStarted(HalloweenSummonStartedEvent summonStartedE

private void OnHalloweenSyncStateEvent(HalloweenSyncStateEvent syncStateEvent)
{
Logger.LogDebug("OnHalloweenSyncStateEvent");
#if DEBUG
Logger.LogWarning("OnHalloweenSyncStateEvent");

Check failure on line 55 in Fika.Core/Coop/Components/CoopHalloweenEventManager.cs

View workflow job for this annotation

GitHub Actions / test

'Logger' is an ambiguous reference between 'BepInEx.Logging.Logger' and 'UnityEngine.Logger'

Check failure on line 55 in Fika.Core/Coop/Components/CoopHalloweenEventManager.cs

View workflow job for this annotation

GitHub Actions / test

'Logger' is an ambiguous reference between 'BepInEx.Logging.Logger' and 'UnityEngine.Logger'
#endif

HalloweenEventPacket packet = new(EHalloweenPacketType.Sync)
{
Expand All @@ -61,7 +65,9 @@ private void OnHalloweenSyncStateEvent(HalloweenSyncStateEvent syncStateEvent)

private void OnHalloweenSyncExitsEvent(HalloweenSyncExitsEvent syncStateEvent)
{
Logger.LogDebug("OnHalloweenSyncExitsEvent");
#if DEBUG
Logger.LogWarning("OnHalloweenSyncExitsEvent");

Check failure on line 69 in Fika.Core/Coop/Components/CoopHalloweenEventManager.cs

View workflow job for this annotation

GitHub Actions / test

'Logger' is an ambiguous reference between 'BepInEx.Logging.Logger' and 'UnityEngine.Logger'

Check failure on line 69 in Fika.Core/Coop/Components/CoopHalloweenEventManager.cs

View workflow job for this annotation

GitHub Actions / test

'Logger' is an ambiguous reference between 'BepInEx.Logging.Logger' and 'UnityEngine.Logger'
#endif

HalloweenEventPacket packet = new(EHalloweenPacketType.Exit)
{
Expand Down

0 comments on commit d95f1d3

Please sign in to comment.