-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Local IP Address Layout Renderer
Rolf Kristensen edited this page Jan 13, 2020
·
3 revisions
The local IP address whether IPv4 or IPv6 from NetworkInterface.GetAllNetworkInterfaces
Platforms Supported: Limited (Not supported on NetStandard1.3+1.5)
Introduced with NLog 4.6.8
${local-ip:addressFamily=InterNetwork}
- AddressFamily - Explicitly prioritize IP addresses from a certain AddressFamily (Ex. InterNetwork / InterNetworkV6)
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}
- Troubleshooting Guide - See available NLog Targets and Layouts: https://nlog-project.org/config
- Getting started
- How to use structured logging
- Troubleshooting
- FAQ
-
All targets, layouts and layout renderers
Popular: - Using NLog with NLog.config
- Using NLog with appsettings.json