Skip to content

Commit

Permalink
Cleaned up some outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgedevs committed Apr 23, 2024
1 parent 53b82a2 commit 74a8204
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Source/Web.Maple.Server/MapleServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ private void Create(IPAddress ipAddress,
if (ni.Address.AddressFamily == AddressFamily.InterNetwork)
{
// for now, just use IPv4
Console.WriteLine($"Listening on http://{ni.Address}:{port}/");
Logger?.Trace($"Listening on http://{ni.Address}:{port}/");

// _httpListener.Prefixes.Add($"http://{ni.Address}:{port}/");
}
Expand All @@ -137,7 +137,7 @@ private void Create(IPAddress ipAddress,
}
else
{
Console.WriteLine($"Listening on http://{IPAddress}:{port}/");
Logger?.Trace($"Listening on http://{IPAddress}:{port}/");

_httpListener.Prefixes.Add($"http://{IPAddress}:{port}/");
}
Expand Down Expand Up @@ -180,6 +180,8 @@ public void Start()
StartUdpAdvertisement();
}
StartListeningToIncomingRequests();

Logger?.Info($"Maple started on IP Address: {IPAddress}");
}

/// <summary>
Expand Down Expand Up @@ -214,7 +216,7 @@ protected void StartUdpAdvertisement()

while (Running && _shouldAdvertise)
{
Logger?.Info("UDP Broadcast: " + broadcastData + ", port: " + MAPLE_SERVER_BROADCASTPORT);
Logger?.Trace("UDP Broadcast: " + broadcastData + ", port: " + MAPLE_SERVER_BROADCASTPORT);
socket.SendTo(UTF8Encoding.UTF8.GetBytes(broadcastData), remoteEndPoint);

Thread.Sleep(AdvertiseIntervalMs);
Expand Down Expand Up @@ -262,7 +264,7 @@ protected void LoadRequestHandlers()

if (typesAdded == 0)
{
Console.WriteLine("Warning: No Maple Server `IRequestHandler`s found. Server will not operate.");
Logger?.Warn("Warning: No Maple Server `IRequestHandler`s found. Server will not operate.");
}
else
{
Expand Down

0 comments on commit 74a8204

Please sign in to comment.