Skip to content
Documentation
Updated 5 minutes to read
Markdown
Release Notes

Add centralized logging to your .NET Framework applications by installing the Nodinite Log4Net Appender NuGet package. This guide provides step-by-step instructions for installation using Visual Studio's NuGet Package Manager, the Package Manager Console, or the .NET CLI.

With this guide, you will:

  • ✅ Quickly install the NuGet package in your .NET Framework project
  • ✅ Automatically manage dependencies and versioning
  • ✅ Configure the appender for seamless integration with Nodinite
  • ✅ Start logging to Nodinite with minimal configuration

This guide shows you how to install the Nodinite Log4Net Appender NuGet package and perform basic configuration.
For detailed implementation examples, see the Implement in a new .NET application user guide.

Ensure you meet all prerequisites, including Visual Studio (2019 or later) and a .NET Framework 4.6.2+ project.

Choose one of the following methods to install the Nodinite Log4Net Appender NuGet package in your project:

Option A: Visual Studio NuGet Package Manager (GUI)

Section titled “Option A: Visual Studio NuGet Package Manager (GUI)”
  1. Open your .NET Framework project in Visual Studio
  2. Right-click on the project in Solution Explorer
  3. Select Manage NuGet Packages...
  4. Click the Browse tab
  5. Search for Nodinite.LogAgent.Log4NetAppender
  6. Select the package and click Install
  7. Accept any license agreements and dependency installations
  1. Open Visual Studio
  2. Go to Tools > NuGet Package Manager > Package Manager Console
  3. Run the following command:
Terminal window
Install-Package Nodinite.LogAgent.Log4NetAppender

Open a command prompt or terminal in your project directory and run:

Terminal window
dotnet add package Nodinite.LogAgent.Log4NetAppender

The NuGet package automatically installs the following dependencies:

  • Nodinite.LogAgent.Log4NetAppender.dll - The main appender library
  • IBSS.Libraries.Contracts.LogRestApi.dll - Log API contracts
  • Apache log4net (if not already installed)
  • Required .NET dependencies (Newtonsoft.Json, System.Text.Json, etc.)

All dependencies are managed automatically by NuGet. The exact versions are determined by the package manifest and will be kept up to date when you update the package.

Add or update your log4net.config file (or configure within App.config / Web.config) with the Nodinite appender configuration:

<log4net>
<appender name="NodiniteLog4NetAppender" type="Nodinite.LogAgent.Log4NetAppender.NodiniteLog4NetAppender,Nodinite.LogAgent.Log4NetAppender">
<!-- Nodinite Configuration -->
<OriginalMessageType value="Nodinite.LogAgent.Log4NetAppender/2.0#DefaultMessageType" />
<MessageTypeExtractFromBody value="false" />
<LogAgentID value="101"/>
<EventNumber value="0"/>
<EndPointName value="My .NET Application"/>
<EndPointUri value="myapp.company.local"/>
<ProcessingUser value="SYSTEM"/>
<ModuleType value=".NET Application"/>
<ProcessName value="MyApp"/>
<ProcessingMachineName value="APP-SERVER-01"/>
<ProcessingModuleType value=".NET Framework"/>
<ProcessingModuleName value="MyApplication"/>
<LogApiServiceURI value="https://nodinite.company.local:40002/LogAPI/"/>
<ApplicationInterchangeId value="{99106FF5-C7BB-4244-9EB7-F99040190F32}"/>
<LocalInterchangeId value="{E4CDDF18-9925-4A79-8E9F-71BC0D4C5172}"/>
<ServiceInstanceActivityId value="{E4CDDF18-9925-4A79-8E9F-71BC0D4C5173}"/>
</appender>
<root>
<level value="INFO"/>
<appender-ref ref="NodiniteLog4NetAppender"/>
</root>
</log4net>
Parameter Description Example
LogApiServiceURI URL of the Nodinite Log API endpoint https://nodinite.company.local:40002/LogAPI/
EndPointName Friendly name for your application Customer Portal API
EndPointUri Unique identifier for the application instance customerportal.prod.company.local
LogAgentID Unique ID for this log agent (obtain from Nodinite) 101
level Minimum log level to capture INFO, WARN, ERROR, DEBUG

For detailed configuration options, see the Configuration page.

Step 3: Initialize Log4Net in Your Application

Section titled “ Step 3: Initialize Log4Net in Your Application”

Ensure Log4Net is configured to read your configuration file. Add this code to your application startup (e.g., Program.cs, Global.asax.cs, or Startup.cs):

using log4net;
using log4net.Config;
// In Main method
XmlConfigurator.Configure(new FileInfo("log4net.config"));
// In Global.asax.cs Application_Start
XmlConfigurator.Configure(new FileInfo(Server.MapPath("~/log4net.config")));
// In Startup.cs or Program.cs
XmlConfigurator.Configure(new FileInfo("log4net.config"));

Test that the appender is working correctly:

using log4net;
private static readonly ILog log = LogManager.GetLogger(typeof(Program));
public void TestLogging()
{
log.Info("Test message from Nodinite Log4Net Appender");
log.Warn("This is a warning");
log.Error("This is an error", new Exception("Test exception"));
}

Check the Nodinite Log Views in the Web Client to verify that log events are being received.


View the latest release information, version history, and changelogs:

View Release Notes in Nodinite Portal

The Portal provides:

  • Current and historical version information
  • Feature additions and bug fixes
  • Breaking changes and migration guides
  • Compatibility notes

To check your installed version, view the package version in Visual Studio's NuGet Package Manager or check your project's .csproj file.


If you encounter issues during installation, contact Support.

Find more solutions and answers in the Troubleshooting user guide for the Nodinite Log4Net Appender.


...

Version:
Release date: N/A
Loading...

Explore Nodinite for 30 days – completely free

  • Find out why this is the leading O&M software
  • Prove your business case
  • Test the self-service for the business side

Loading...

See how Nodinite resolves your technical issues, in a LIVE Demo!

Once you submit this request:

  • We will give you a short call to understand the issues you want to tackle.
  • Understand solutions you have tried and why were you not happy with them.
  • Book a convenient slot for a LIVE demo!

Loading...