﻿---
title: Logs
description: Overview of log correlation and application log ingestion features in the Elastic APM .NET Agent, including supported logging framework integrations.
url: https://www.elastic.co/elastic/docs-builder/docs/3410/reference/apm/agents/dotnet/logs
products:
  - APM .NET Agent
  - APM Agent
applies_to:
  - Serverless Observability projects: Generally available
  - Elastic Stack: Generally available
  - Application Performance Monitoring Agent for .NET: Generally available
---

# Logs
Elastic .NET Agent provides [Log correlation](#log-correlation-ids). The agent will automatically inject correlation IDs that allow navigation between logs, traces, and services.
This features is part of [Application log ingestion strategies](https://docs-v3-preview.elastic.dev/elastic/docs-builder/docs/3410/solutions/observability/logs/stream-application-logs).
The [`ecs-logging-dotnet`](https://docs-v3-preview.elastic.dev/elastic/docs-builder/docs/3410/reference/ecs/logging/dotnet) library can also be used to use the [ECS logging](https://docs-v3-preview.elastic.dev/elastic/docs-builder/docs/3410/reference/ecs/logging/intro) format without an APM .NET Agent. Elastic Common Schema (ECS) .NET logging will always provide [log correlation](#log-correlation-ids) IDs through [`System.Diagnostics.Activity`](https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.activity?view=net-7.0). When paired with the APM .NET Agent it will pick up the appropriate service correlation features too.

## Log correlation

The Elastic APM .NET Agent provides integrations for popular logging frameworks, which take care of injecting trace ID fields into your application’s log records. Currently supported logging frameworks are:
- [Serilog](https://www.elastic.co/elastic/docs-builder/docs/3410/reference/apm/agents/dotnet/serilog)
- [NLog](https://www.elastic.co/elastic/docs-builder/docs/3410/reference/apm/agents/dotnet/nlog)

If your favorite logging framework is not already supported, there are two other options:
- Open a feature request, or contribute code, for additional support, as described in [CONTRIBUTING.md](https://github.com/elastic/apm-agent-dotnet/blob/main/CONTRIBUTING.md).
- Manually inject trace IDs into log records, as described in [Manual log correlation](https://www.elastic.co/elastic/docs-builder/docs/3410/reference/apm/agents/dotnet/log-correlation-manual).

Regardless of how you integrate APM .NET Agent with logging, you can use [Filebeat](https://docs-v3-preview.elastic.dev/elastic/docs-builder/docs/3410/reference/beats/filebeat) to send your logs to Elasticsearch, in order to correlate your traces and logs and link from APM to [explore logs](https://docs-v3-preview.elastic.dev/elastic/docs-builder/docs/3410/solutions/observability/logs/explore-logs).