log4net.Appender.SocketAppender
1.0.1
dotnet add package log4net.Appender.SocketAppender --version 1.0.1
NuGet\Install-Package log4net.Appender.SocketAppender -Version 1.0.1
<PackageReference Include="log4net.Appender.SocketAppender" Version="1.0.1" />
paket add log4net.Appender.SocketAppender --version 1.0.1
#r "nuget: log4net.Appender.SocketAppender, 1.0.1"
// Install log4net.Appender.SocketAppender as a Cake Addin #addin nuget:?package=log4net.Appender.SocketAppender&version=1.0.1 // Install log4net.Appender.SocketAppender as a Cake Tool #tool nuget:?package=log4net.Appender.SocketAppender&version=1.0.1
SocketAppender Readme
Config in code:
log4net.GlobalContext.Properties["HostIP"] = System.Net.Dns.GetHostAddresses(System.Net.Dns.GetHostName()).FirstOrDefault(a => a.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork).ToString();
log4net.GlobalContext.Properties["Version"] = System.Reflection.Assembly.GetEntryAssembly().GetName().Version.ToString(4);
log4net.GlobalContext.Properties["AppName"] = System.Reflection.Assembly.GetEntryAssembly().GetName().Name;
log4net.GlobalContext.Properties["AppFullName"] = Assembly.GetEntryAssembly().GetCustomAttribute<AssemblyDescriptionAttribute>()?.Description;
Config in Xml
<appender name="SocketAppender" type="log4net.Appender.SocketAppender,log4net.Appender.SocketAppender">
<RemoteAddress value="127.0.0.1" />
<RemotePort value="5001" />
<AddressFamily value="InterNetwork" />
<SocketType value="Dgram" />
<ProtocolType value="Udp" />
<ConAttemptsCount value="5" />
<ConAttemptsWaitingTimeMilliSeconds value="3000" />
<UseThreadPoolQueue value="true" />
<layout type="log4net.Layout.PatternLayout, log4net">
<conversionPattern value="{"LogType":"IoTHub.Log","AppName":"%property{AppName}","AppFullName":"%property{AppFullName}","Version":"%property{Version}""host":"%property{HostIP}","LogLevel":"%level","@timestamp":"%date{ISO8601}","Logger":"%logger","message":"%message"}" />
</layout>
</appender>
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.1 is compatible. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Framework | net20 is compatible. net35 was computed. net40 is compatible. net403 was computed. net45 was computed. net451 was computed. net452 is compatible. net46 is compatible. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.