NLog-MQTT Custom Target
Creating a custom NLog Target that outputs logs to an MQTT Server for real-time web-based log monitoring via WebSocket-MQTT, instead of traditional WebAPI polling.
Implementation
The custom target overrides the Write method, serializes log events to JSON with both default and custom fields, and publishes to an MQTT topic.