Skip to content

Commit 971bcc7

Browse files
committed
chore: remove homebrew Intersect logging and replace with Serilog and Microsoft ILogger
1 parent 540033b commit 971bcc7

File tree

485 files changed

+1507
-3614
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

485 files changed

+1507
-3614
lines changed

Examples/Intersect.Examples.Plugin.Client.Tests/ManifestTest.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// NUnit 3 tests
22
// See documentation : https://github.com/nunit/docs/wiki/NUnit-Documentation
33
using Intersect.Plugins.Loaders;
4-
54
using NUnit.Framework;
65

76
namespace Intersect.Examples.Plugin.Client

Examples/Intersect.Examples.Plugin.Client/ExampleCommandLineOptions.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
using CommandLine;
2-
32
using Intersect.Utilities;
4-
53
using System;
64

75
namespace Intersect.Examples.Plugin.Client

Examples/Intersect.Examples.Plugin.Client/ExamplePluginConfiguration.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using Intersect.Plugins;
2-
32
using Newtonsoft.Json;
43

54
namespace Intersect.Examples.Plugin.Client

Examples/Intersect.Examples.Plugin.Client/Manifest.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
using Intersect.Plugins.Interfaces;
22
using Intersect.Plugins.Manifests.Types;
33
using Intersect.Utilities;
4-
54
using Semver;
6-
75
using System;
86
using System.Collections.Generic;
97

Examples/Intersect.Examples.Plugin.Client/PacketHandlers/ExamplePluginServerPacketHandler.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
using Intersect.Examples.Plugin.Packets.Client;
22
using Intersect.Examples.Plugin.Packets.Server;
3-
using Intersect.Logging;
43
using Intersect.Network;
5-
64
using System;
75

86
namespace Intersect.Examples.Plugin.Client.PacketHandlers
@@ -21,15 +19,15 @@ public bool Handle(IPacketSender packetSender, ExamplePluginServerPacket packet)
2119
throw new ArgumentNullException(nameof(packet));
2220
}
2321

24-
Log.Info($"Received server packet! The server said '{packet.ExamplePluginMessage}'.");
22+
ApplicationContext.Context.Value?.Logger.LogInformation($"Received server packet! The server said '{packet.ExamplePluginMessage}'.");
2523

2624
var packetSent = packetSender.Send(new ExamplePluginClientPacket("A message from the client!"));
2725
if (packetSent)
2826
{
29-
Log.Info("Sent response back to the server!");
27+
ApplicationContext.Context.Value?.Logger.LogInformation("Sent response back to the server!");
3028
} else
3129
{
32-
Log.Error("Failed to send response back to the server!");
30+
ApplicationContext.Context.Value?.Logger.LogError("Failed to send response back to the server!");
3331
}
3432

3533
return packetSent;

Examples/Intersect.Examples.Plugin.Server/ExampleServerPluginEntry.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using Intersect.Network.Packets.Client;
66
using Intersect.Plugins;
77
using Intersect.Server.Plugins;
8-
98
using System;
109

1110
namespace Intersect.Examples.Plugin.Server

Examples/Intersect.Examples.Plugin.Server/Manifest.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
using Intersect.Plugins.Interfaces;
22
using Intersect.Plugins.Manifests.Types;
33
using Intersect.Utilities;
4-
54
using Semver;
6-
75
using System;
86
using System.Collections.Generic;
97

Examples/Intersect.Examples.Plugin.Server/Networking/Handlers/ExamplePluginClientPacketHandler.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using Intersect.Examples.Plugin.Packets.Client;
2-
using Intersect.Logging;
32
using Intersect.Network;
43

54
namespace Intersect.Examples.Plugin.Server.Networking.Handlers
@@ -8,7 +7,7 @@ public class ExamplePluginClientPacketHandler : IPacketHandler<ExamplePluginClie
87
{
98
public bool Handle(IPacketSender packetSender, ExamplePluginClientPacket packet)
109
{
11-
Log.Info($"Received example plugin response from the client: {packet.ExamplePluginMessage}");
10+
ApplicationContext.Context.Value?.Logger.LogInformation($"Received example plugin response from the client: {packet.ExamplePluginMessage}");
1211
return true;
1312
}
1413

Examples/Intersect.Examples.Plugin.Server/Networking/Hooks/ExamplePluginLoginPostHook.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using Intersect.Examples.Plugin.Packets.Server;
2-
using Intersect.Logging;
32
using Intersect.Network;
43
using Intersect.Network.Packets.Client;
54

@@ -12,11 +11,11 @@ public bool Handle(IPacketSender packetSender, LoginPacket packet)
1211
var packetSent = packetSender.Send(new ExamplePluginServerPacket($"Login packet received: {packet.Username}"));
1312
if (packetSent)
1413
{
15-
Log.Info("Sent a message to the client!");
14+
ApplicationContext.Context.Value?.Logger.LogInformation("Sent a message to the client!");
1615
}
1716
else
1817
{
19-
Log.Error("Failed to send a message to the client!");
18+
ApplicationContext.Context.Value?.Logger.LogError("Failed to send a message to the client!");
2019
}
2120

2221
return packetSent;

Examples/Intersect.Examples.Plugin/Packets/Client/ExamplePluginClientPacket.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using Intersect.Network;
2-
32
using MessagePack;
43

54
namespace Intersect.Examples.Plugin.Packets.Client

0 commit comments

Comments
 (0)