Skip to content

Commit

Permalink
Merge pull request #32 from WildernessLabs/jorge-output-fixes
Browse files Browse the repository at this point in the history
Cleaned up some outputs
  • Loading branch information
jorgedevs authored Apr 26, 2024
2 parents 53b82a2 + ed199f1 commit 6fd61c4
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 25 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/develop-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ name: Develop Build
on:
workflow_dispatch:
pull_request:
branches: [ develop ]
push:
branches: [ develop ]
branches: [ develop ]

jobs:
build:
Expand Down Expand Up @@ -41,12 +42,12 @@ jobs:
path: Meadow.Modbus
ref: develop

- name: Checkout MQTTnet fork
- name: Checkout MQTTnet
uses: actions/checkout@v3
with:
repository: WildernessLabs/MQTTnet
path: MQTTnet
ref: meadow
ref: develop

- name: Checkout Meadow.Core
uses: actions/checkout@v3
Expand All @@ -71,7 +72,7 @@ jobs:
uses: actions/setup-dotnet@v1
with:
dotnet-version:
7.0.x
8.0.x

- name: Build Maple
run: dotnet build -c Release Maple/Source/Maple.sln
26 changes: 12 additions & 14 deletions Source/Utilities/Maple.Server_UDP_Listener_Sample.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Company>Wilderness Labs, Inc</Company>
<Authors>Wilderness Labs, Inc</Authors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<LangVersion>10.0</LangVersion>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
<PropertyGroup>
<Company>Wilderness Labs, Inc</Company>
<Authors>Wilderness Labs, Inc</Authors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<LangVersion>10.0</LangVersion>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion Source/Web.Maple.Client/Web.Maple.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Nullable>enable</Nullable>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Authors>Wilderness Labs, Inc</Authors>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>netstandard2.1</TargetFramework>
<AssemblyName>Maple.Client</AssemblyName>
<Company>Wilderness Labs, Inc</Company>
<PackageProjectUrl>http://developer.wildernesslabs.co/Meadow/Meadow.Foundation/</PackageProjectUrl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Authors>Wilderness Labs, Inc</Authors>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Web.Maple.Client\Web.Maple.Client.csproj" />
Expand Down
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Authors>Wilderness Labs, Inc</Authors>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Web.Maple.Server\Web.Maple.Server.csproj" />
Expand Down

0 comments on commit 6fd61c4

Please sign in to comment.