-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Abc.Zebus.TinyHost: Upgrade target framework and add default log4net.…
…config and app config file
- Loading branch information
1 parent
c1fa59a
commit bcdd656
Showing
4 changed files
with
54 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,20 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>net48</TargetFramework> | ||
<TargetFramework>net6.0-windows</TargetFramework> | ||
<OutputType>Exe</OutputType> | ||
<LangVersion>10</LangVersion> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="log4net" Version="2.0.14" /> | ||
<PackageReference Include="System.ServiceProcess.ServiceController" Version="5.0.0" /> | ||
<PackageReference Include="Zebus" Version="3.8.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<None Update="log4net.config"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</None> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<appSettings> | ||
<add key="Bus.PeerId" value="WRITE_YOUR_SERVICE_NAME_HERE" /> <!-- example: MyCompany.MyService --> | ||
<add key="Bus.Environment" value="WRITE_YOUR_ENVIRONMENT_HERE" /> <!-- example: Dev or Staging or Prod --> | ||
<add key="Bus.Directory.EndPoints" value="WRITE_YOUR_DIRECTORY_ADDRESS_HERE" /> <!-- example: tcp://YourMachineName:129 --> | ||
|
||
<add key="Bus.Directory.RegistrationTimeout" value="00:01:00" /> | ||
<add key="Bus.Persistence.StartReplayTimeout" value="00:01:00" /> | ||
<add key="Bus.IsPersistent" value="false" /> | ||
<add key="Bus.Directory.PickRandom" value="true" /> | ||
<add key="Bus.IsErrorPublicationEnabled" value="false" /> | ||
<add key="Bus.MessagesBatchSize" value="100" /> | ||
|
||
<add key="Bus.InboundEndPoint" value="tcp://*:*" /> | ||
<add key="Bus.WaitForEndOfStreamAckTimeout" value="00:00:05" /> | ||
</appSettings> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<log4net> | ||
<appender name="ConsoleAppender" type="log4net.Appender.ManagedColoredConsoleAppender"> | ||
<mapping> | ||
<level value="ERROR" /> | ||
<foreColor value="Red" /> | ||
</mapping> | ||
<mapping> | ||
<level value="WARN" /> | ||
<foreColor value="Yellow" /> | ||
</mapping> | ||
<mapping> | ||
<level value="INFO" /> | ||
<foreColor value="White" /> | ||
</mapping> | ||
<layout type="log4net.Layout.PatternLayout"> | ||
<conversionPattern value="%utcdate{yyyy-MM-dd HH:mm:ss.fff}Z - %thread - %-5level - %logger || %message%newline" /> | ||
</layout> | ||
</appender> | ||
|
||
<root> | ||
<level value="INFO" /> | ||
<appender-ref ref="ConsoleAppender" /> | ||
</root> | ||
</log4net> |