---
title: Choosing an Appender Framework for Custom Logging
description: Which logging appender framework should you use for Custom Logging? Compare Log4Net, Serilog, Log4J, and custom JSON generation.
---

# Which appender framework should I use (.NET/Java/Python)?

**Choose an appender framework based on your technology stack and deployment model.** Appender frameworks provide an abstraction layer, prevent vendor lock-in, and enable logging to multiple destinations simultaneously.

## .NET Framework → Use Log4Net

[Log4Net Appender][] for .NET Framework 4.x applications:

* ✅ Mature, battle-tested logging framework
* ✅ <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> provides custom appender - writes JSON [Log Events][] to intermediate storage
* ✅ Minimal code changes - configure in `app.config` or `web.config`
* ✅ Supports multiple destinations - <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> + local files + Splunk simultaneously

**Use cases:** Legacy BizTalk integrations, ASP.NET web services, Windows services

**Example:**

```csharp
log4net.ILog log = log4net.LogManager.GetLogger("MyIntegration");
log.Info("Order processed", new { OrderId = "PO-12345", CustomerId = "Contoso" });
```

## .NET Core / .NET → Use Serilog

[Serilog][] for modern .NET Core, .NET, Azure Functions:

* ✅ Structured logging with rich context
* ✅ <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> provides Serilog sink - writes to [Azure Service Bus][], Azure Storage, files
* ✅ Cloud-native - perfect for Azure Functions, microservices, containers
* ✅ High performance - asynchronous writing, batching

**Use cases:** Azure Functions, ASP.NET Core APIs, microservices, serverless

**Example:**

```csharp
Log.Information("Order {OrderId} processed for customer {CustomerId}", 
    "PO-12345", "Contoso");
```

## Java → Use Log4J or SLF4J

**Log4J / SLF4J** for Java-based integrations:

* ✅ Standard Java logging frameworks
* ✅ Custom appender writes <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> JSON Log Events
* ✅ Works with Apache Camel, Spring Boot, webMethods Java services

**Use cases:** Apache Camel routes, Spring Boot microservices, webMethods integrations

**Example:**

```java
logger.info("Order {} processed for customer {}", orderId, customerId);
```

## Python → Use Python logging module

**Python `logging` module** with custom handler:

* ✅ Built-in Python standard library
* ✅ Custom handler writes JSON to queue/file
* ✅ Structured logging with dictionaries

**Use cases:** Python batch jobs, Flask/Django APIs, data pipelines

**Example:**

```python
logging.info("Order processed", extra={
    "OrderId": "PO-12345", 
    "CustomerId": "Contoso"
})
```

## Node.js → Use Winston or Bunyan

**Winston / Bunyan** for Node.js integrations:

* ✅ Popular Node.js logging libraries
* ✅ Custom transport writes JSON Log Events
* ✅ Supports structured logging

**Use cases:** Express.js APIs, Node.js microservices, serverless functions

**Example (Winston):**

```javascript
logger.info("Order processed", { 
    orderId: "PO-12345", 
    customerId: "Contoso" 
});
```

## Custom JSON Generation → Any Platform

**Handcraft JSON Log Events** for platforms without appender support:

* ✅ Works with **any** technology (Go, Rust, PHP, Ruby, PowerShell, etc.)
* ✅ Full control over JSON structure
* ✅ Follow [JSON Log Event][] specification

**Use cases:** MuleSoft (use [Mule ESB Custom Connector][]), IBM Sterling, TEIS, custom platforms

**Example (any language):**

```json
{
  "LogAgentValueId": 42,
  "EndPointName": "Custom Integration",
  "OriginalMessageTypeName": "PurchaseOrder#1.0",
  "ApplicationInterchangeId": "a1b2c3d4-e5f6-7890",
  "LogMessage": "Order processed",
  "StateCode": 0,
  "Body": "<Order>...</Order>"
}
```

## Decision Matrix

|**Platform**|**Recommended Framework**|**Why**|  
|---|---|---|  
|<i class="fab fa-microsoft" aria-hidden="true"></i> .NET Framework 4.x|[Log4Net Appender][]|Mature, proven, minimal changes|  
|<i class="fab fa-microsoft" aria-hidden="true"></i> .NET Core / .NET 5-8|[Serilog][]|Modern, cloud-native, structured|  
|<i class="fal fa-bolt" aria-hidden="true"></i> Azure Functions|[Serilog][]|Serverless-optimized|  
|<i class="fab fa-java" aria-hidden="true"></i> Java (Camel, Spring)|Log4J / SLF4J|Java standard|  
|<i class="fab fa-python" aria-hidden="true"></i> Python|`logging` module|Built-in, simple|  
|<i class="fab fa-node-js" aria-hidden="true"></i> Node.js|Winston / Bunyan|Popular, flexible|  
|<i class="fal fa-cube" aria-hidden="true"></i> MuleSoft|[Mule ESB Custom Connector][]|Pre-built connector|  
|<i class="fal fa-cube" aria-hidden="true"></i> webMethods|Log4J (Java services) or custom|Platform-specific|  
|<i class="fal fa-code" aria-hidden="true"></i> Other platforms|Custom JSON generation|Universal compatibility|  

**Need templates?** Review [Hello World Sample][] (.NET) or [Mule ESB Custom Connector][] for reference implementations.

---

**Related Topics:**  
[Log4Net Appender Documentation][]  
[Serilog Documentation][]  
[JSON Log Event Format][]  

**See all FAQs:** [Troubleshooting Overview][]

## <i class="fal fa-hand-point-right" aria-hidden="true"></i> Next Steps

<i class="fal fa-book" aria-hidden="true"></i> [Back to Custom Logging Overview][Custom Logging Overview]  

## <i class="fal fa-link-horizontal" aria-hidden="true"></i> Related Topics

* <i class="fal fa-question-circle" aria-hidden="true"></i> [Troubleshooting Overview][Troubleshooting]  

[Azure Service Bus]:https://docs.nodinite.com/logging-and-monitoring/message-queueing/features/azure-service-bus-queues/monitoring-azure-service-bus-queue/
[Custom Logging Overview]:https://docs.nodinite.com/logging-and-monitoring/custom-logging/overview/
[Hello World Sample]:https://docs.nodinite.com/core-services/log-api/troubleshooting/faq-hello-world-net-sample/
[JSON Log Event]:https://docs.nodinite.com/core-services/log-event/features/json-log-event/
[JSON Log Event Format]:https://docs.nodinite.com/core-services/log-event/features/json-log-event/
[Log Events]:https://docs.nodinite.com/core-services/log-event/overview/
[Log4Net Appender]:https://docs.nodinite.com/logging-and-monitoring/log4net-appender/overview/
[Log4Net Appender Documentation]:https://docs.nodinite.com/logging-and-monitoring/log4net-appender/overview/
[Mule ESB Custom Connector]:https://docs.nodinite.com/logging-and-monitoring/mulesoft-anypoint-platform-logging/features/custom-connector/
[Serilog]:https://docs.nodinite.com/logging-and-monitoring/serilog/overview/
[Serilog Documentation]:https://docs.nodinite.com/logging-and-monitoring/serilog/overview/
[Troubleshooting]:https://docs.nodinite.com/logging-and-monitoring/custom-logging/troubleshooting/overview/
[Troubleshooting Overview]:https://docs.nodinite.com/logging-and-monitoring/custom-logging/troubleshooting/overview/