Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Local IP Address Layout Renderer

Rolf Kristensen edited this page Jul 2, 2025 · 5 revisions

The local IP address whether IPv4 or IPv6 from NetworkInterface.GetAllNetworkInterfaces

Platforms Supported: All - Requires nuget-package NLog.Targets.Network since NLog v6

Introduced with NLog 4.6.8

Configuration Syntax

${local-ip:addressFamily=InterNetwork}

Parameters

  • AddressFamily - Explicitly prioritize IP addresses from a certain AddressFamily (Ex. InterNetwork / InterNetworkV6)

Improving Performance

The lookup of the active IP-address on the local machine has a performance hit. For better performance then it is recommended to use it with cachedSeconds like this:

${local-ip:cachedSeconds=60}

Clone this wiki locally

Morty Proxy This is a proxified and sanitized view of the page, visit original site.