- 3 minutes to read

Installing the Nodinite Log4Net Appender

This guide teaches how to install the Nodinite Log4Net Appender and perform basic configuration to get you started.

You must be granted RDP logon rights or at least have file privileges to manage files to enable logging with the Log4Net Appender.

Before you begin

Make sure you comply with the prerequisites.

Step 1: Copy required binaries

Copy the following files to the bin folder for the .NET application:

  • IM.Libraries.Contracts.LogApi.dll
  • IMLogAppender.dll
  • WCFExtras.dll

Step 2: Add bindings and address to Log API

Open your web/app.config and add the binding and end point section for enabling logging to the Nodinite Log API

        <binding name="BasicHttpBinding_ILogApiService" />
        <endpoint address="http://localhost/Nodinite/LogAPI/LogApiService.svc"
        binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ILogApiService"
        contract="IM.Libraries.Contracts.LogApi.ILogApiService" name="BasicHttpBinding_ILogApiService" />

Make sure to change the address to the Log API to match your configuration:


Step 3: Add Appender

Add appender section to log4net and add IMAppender as an appender

        <appender name="IMAppender" type="IM.Log4NetAppender,IM.LogAgent.Log4NetAppender">
            <!-- Custom Parameters -->
            <OriginalMessageType value="IM.LogAgent.Log4NetAppender/2.0#DefaultMessageType" />
            <MessageTypeExtractFromBody value="false" />
            <LogAgentID value="101"/>
            <EventNumber value="0"/>
            <EndPointName value="Log4Net Unit Test"/>
            <EndPointUri value="VS.local.log4net.test"/>
            <LogText value =""/>
            <LogStatusId value ="255"/>
            <ProcessingUser value="Administrator"/>
            <ModuleType value="unit test"/>
            <ProcessName value="unit test"/>
            <ProcessingMachineName value="DEV"/>
            <ProcessingModuleType value="unit test"/>
            <ProcessingModuleName value="VS"/>
            <LogApiServiceURI value="http://localhost/Nodinite/LogAPI/LogApiService.svc"/>
            <AppInterchangeIDStr value="{99106FF5-C7BB-4244-9EB7-F99040190F32}"/>
            <LocInterChangeIDStr value="{E4CDDF18-9925-4A79-8E9F-71BC0D4C5172}"/>
            <ServiceInstanceActivityIDStr value="{E4CDDF18-9925-4A79-8E9F-71BC0D4C5173}"/>
            <level value="DEBUG"/>
            <appender-ref ref="IMAppender"/>


Contact our Support for additional guidance if you fail to resolve the installation problem.

NOTE: Additional information to aid the troubleshooting may exist in the Windows Event Logs.

Frequently asked questions

Additional solutions to common problems and the FAQ for the Nodinite Log4Net Appender exist in the Troubleshooting user guide.

Next step