---
title: Logging to Multiple Destinations Simultaneously
description: Can you log to multiple destinations simultaneously? Learn how appender-based architecture enables logging to Nodinite, Splunk, local files, and more.
---

# Can I log to multiple destinations simultaneously (Nodinite + Splunk + local files)?

**Yes—appender-based logging frameworks enable writing to multiple destinations simultaneously without code changes.** Log once, deliver to <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span>, Splunk, local files, CloudWatch, and custom destinations in parallel.

## Why Log to Multiple Destinations

### <i class="fal fa-circle-check" aria-hidden="true"></i> Migration Safety

During platform migrations, log to **both** old and new systems:

* <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> (new centralized logging)
* Splunk (existing logs for comparison)
* Local files (backup during transition)

**Zero risk:** Verify <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> logs match Splunk before decommissioning old system.

### <i class="fal fa-circle-check" aria-hidden="true"></i> Compliance Requirements

Meet regulatory requirements demanding multiple log retention locations:

* <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> (operational visibility, business intelligence)
* Immutable archive (S3 Glacier, Azure Blob cold storage for 7-year retention)

### <i class="fal fa-circle-check" aria-hidden="true"></i> Hybrid Architectures

Support multi-team environments with different tools:

* <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> (integration team uses for correlation, [BPM][BPMs])
* Splunk (security team uses for audit trails, intrusion detection)
* Local files (developers use for debugging in dev/test)

### <i class="fal fa-circle-check" aria-hidden="true"></i> Redundancy

Ensure log availability even if one destination fails:

* <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> primary destination
* Local file share as backup (if <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> temporarily unavailable)

## How Appenders Enable Multiple Destinations

Appender frameworks (Log4Net, [Serilog][Serilog Multiple Sinks], Log4J, Winston) support **multiple sinks/appenders** configured declaratively:

### .NET Framework Example (Log4Net)

**app.config:**

```xml
<log4net>
  <!-- Appender 1: Nodinite via file share -->
  <appender name="NodiniteFileAppender" type="log4net.Appender.RollingFileAppender">
    <file value="\\fileserver\nodinite-logs\myapp\" />
    <appendToFile value="true" />
    <layout type="Nodinite.Log4Net.JsonLayout, Nodinite.Log4Net" />
  </appender>
  
  <!-- Appender 2: Local files for debugging -->
  <appender name="LocalFileAppender" type="log4net.Appender.RollingFileAppender">
    <file value="C:\Logs\myapp.log" />
    <appendToFile value="true" />
    <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
    </layout>
  </appender>
  
  <!-- Appender 3: Splunk via HTTP -->
  <appender name="SplunkAppender" type="Splunk.Logging.RollingFileAppender, Splunk.Logging.Log4Net">
    <url value="https://splunk.company.com:8088" />
    <token value="YOUR-SPLUNK-TOKEN" />
  </appender>
  
  <root>
    <level value="INFO" />
    <appender-ref ref="NodiniteFileAppender" />
    <appender-ref ref="LocalFileAppender" />
    <appender-ref ref="SplunkAppender" />
  </root>
</log4net>
```

**Code remains identical:**

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

**Result:** Log event written to **all 3 destinations**—<span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> file share, local file, Splunk HTTP endpoint.

### .NET Core Example (Serilog)

**Program.cs:**

```csharp
Log.Logger = new LoggerConfiguration()
    // Sink 1: Nodinite via Azure Service Bus
    .WriteTo.AzureServiceBus(
        connectionString: "Endpoint=sb://...",
        queueName: "nodinite-logs")
    // Sink 2: Local files
    .WriteTo.File("C:\\Logs\\myapp.log", rollingInterval: RollingInterval.Day)
    // Sink 3: Application Insights
    .WriteTo.ApplicationInsights(telemetryConfig, TelemetryConverter.Traces)
    .CreateLogger();
```

**Code remains identical:**

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

**Result:** Log event written to **3 destinations**—[Azure Service Bus][] queue (<span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span>), local file, Application Insights.

### Java Example (Log4J with SLF4J)

**log4j2.xml:**

```xml
<Configuration>
  <Appenders>
    <!-- Appender 1: Nodinite via RabbitMQ -->
    <RabbitMQ name="NodiniteAppender" 
      host="rabbitmq.company.com" 
      queue="nodinite-logs">
      <JsonLayout />
    </RabbitMQ>
    
    <!-- Appender 2: Local file -->
    <File name="FileAppender" fileName="logs/myapp.log">
      <PatternLayout pattern="%d{ISO8601} [%t] %-5level %logger{36} - %msg%n" />
    </File>
    
    <!-- Appender 3: Splunk -->
    <Splunk name="SplunkAppender" 
      url="https://splunk.company.com:8088" 
      token="YOUR-TOKEN" />
  </Appenders>
  
  <Loggers>
    <Root level="info">
      <AppenderRef ref="NodiniteAppender" />
      <AppenderRef ref="FileAppender" />
      <AppenderRef ref="SplunkAppender" />
    </Root>
  </Loggers>
</Configuration>
```

**Code remains identical:**

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

## Different Formats Per Destination

Send **different formats** to each destination:

* **<span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span>** [JSON Log Event][] format (for business intelligence, [Search Fields][], BPM)
* **Splunk:** Plain text with timestamp (for security team's existing queries)
* **Local files:** Verbose debug format (for developers)

**Same log call, different serialization per appender.**

## Performance Considerations

* ✅ **Asynchronous appenders** - Background threads write to destinations, no blocking
* ✅ **Batching** - Serilog/Log4J batch writes to reduce overhead
* ⚠️ **Synchronous HTTP appenders** - Can add latency (Splunk HTTP), prefer async

**Best practice:** Use asynchronous appenders for all destinations to avoid integration performance impact.

## Configuration Best Practices

* ✅ **Externalize configuration** - Use config files (`app.config`, `appsettings.json`, `log4j2.xml`), not hardcoded
* ✅ **Environment-specific** - Dev logs to console + local files, Production logs to <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> + archive
* ✅ **Failure handling** - If one destination fails (e.g., Splunk down), others continue
* ✅ **Monitoring** - Alert if appenders fail (check [Pickup Service][] backlog, Splunk ingestion metrics)

---

**Related Topics:**  
[Log4Net Appender Documentation][]  
[Serilog Multiple Sinks][]  
[Asynchronous Logging Architecture][]  

**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]  

[Asynchronous Logging Architecture]:https://docs.nodinite.com/core-services/log-api/features/asynchronous-logging/
[Azure Service Bus]:https://docs.nodinite.com/logging-and-monitoring/message-queueing/features/azure-service-bus-queues/monitoring-azure-service-bus-queue/
[BPMs]:https://docs.nodinite.com/repository-model/bpms/overview/
[Custom Logging Overview]:https://docs.nodinite.com/logging-and-monitoring/custom-logging/overview/
[JSON Log Event]:https://docs.nodinite.com/core-services/log-event/features/json-log-event/
[Log4Net Appender Documentation]:https://docs.nodinite.com/logging-and-monitoring/log4net-appender/overview/
[Pickup Service]:https://docs.nodinite.com/logging-and-monitoring/pickup-logevents-service/overview/
[Search Fields]:https://docs.nodinite.com/administration/log-management/search-fields/features/what-is-a-search-field/
[Serilog Multiple Sinks]: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/