> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://mezmo.ferndocs.com/nxlog-for-windows/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://mezmo.ferndocs.com/_mcp/server.
# NXLog
> Mezmo provides an integration with NXLog to collect, monitor, and analyze Windows event logs.
NXLog is the workhorse of Windows logging plugins. You can use our configuration file for NXLog to set up the ingestion of Windows events logs to Mezmo.
## Set Up NXLog Log Ingestion
Follow the instructions in the Mezmo Web App to set up NXLog log ingestion using your Mezmo syslog port and security certificate
1. Log in to the [Mezmo Web App](http://app.mezmo.com).
2. In the bottom section of the left-hand navigation, click **Help**.
3. Select **Add Log Sources**.
4. Under **Via platform**, click **NXLog**.
5. Follow the instructions to set up NXLog log ingestion.
You can also get [a copy of the NXLog configuration file](https://github.com/logdna/logdna-nxlog) from our GitHub repository.
## Example NXLog Configuration File
Copy the following config to `$NXLOGDIR\conf\nxlog.conf`, where `$NXLOGDIR` is directory nxlog is installed in.
```none
Panic Soft
#NoFreeOnExit TRUE
define ROOT C:\\Program Files (x86)\\nxlog
define CERTDIR %ROOT%\\cert
define CONFDIR %ROOT%\\conf
define LOGDIR %ROOT%\\data
define LOGFILE %LOGDIR%\\nxlog.log
LogFile %LOGFILE%
Moduledir %ROOT%\\modules
CacheDir %ROOT%\\data
Pidfile %ROOT%\\data\\nxlog.pid
SpoolDir %ROOT%\\data
Module xm_syslog
Module xm_exec
Module xm_json
Module im_internal
Exec $Message = to_json();
#######################################################################
##### This is just explicit version of internal input above ###########
#######################################################################
#
# Module im_file
# File '%LOGFILE%'
#
# $Message = $raw_event;
# if $Message == '' drop();
# $SourceName = substr(file_name(), size('%LOGDIR%') + 1);
#
#
#######################################################################
# Define Directory for Making Substring Operation
define LOGFOLDER C:\\ProgramData\\logs
Module im_file
File '%LOGFOLDER%\\*.log'
Recursive TRUE
$Message = $raw_event;
if $Message == '' drop();
$SourceName = substr(file_name(), size('%LOGFOLDER%') + 2);
Module im_msvistalog
Exec $Message = to_json();
Module pm_buffer
MaxSize 102400
Type disk
Path internal, filelog, eventlog => buffer => out
```
## Customizing the Config
* **Windows Event Logging is captured in lines `61—73`.**
* Uncomment the lines to enable logging from the specified channels
* Comment out the lines to disable logging from the specified channels
* Add custom channels to enable logging from into the same `Query` block
* **Windows File Logging is capture in lines `47—59`.**
* Update log directory where to stream logs from log files located in line `48`
* Update log files to stream logs from in line `52`
* **All input, processor, and output channels are connected in route block.**
* Comment out the whole block and remove from the route to disable logging from specific input channel
* Add new input modules with unique names to be added to the route to enable logging from new sources
## Example for Tailing Additional Log Files
> You can add additional logfiles by creating a new `` section that imitates the previous ones, and adding the name of that section to `` at the end.
```none
Module im_file
File '%LOGDIR%\\example.log'
Exec $Message = to_json();
```
\---published
NXLog is the workhorse of Windows logging plugins. You can use our configuration file for NXLog to set up the ingestion of Windows events logs to Mezmo.
## Set Up NXLog Log Ingestion
Follow the instructions in the Mezmo Web App to set up NXLog log ingestion using your Mezmo syslog port and security certificate
1. Log in to the [Mezmo Web App](http://app.mezmo.com).
2. In the bottom section of the left-hand navigation, click **Help**.
3. Select **Add Log Sources**.
4. Under **Via platform**, click **NXLog**.
5. Follow the instructions to set up NXLog log ingestion.
You can also get [a copy of the NXLog configuration file](https://github.com/logdna/logdna-nxlog) from our GitHub repository.
## Example NXLog Configuration File
```none
Panic Soft
#NoFreeOnExit TRUE
define ROOT C:\\Program Files (x86)\\nxlog
define CERTDIR %ROOT%\\cert
define CONFDIR %ROOT%\\conf
define LOGDIR %ROOT%\\data
define LOGFILE %LOGDIR%\\nxlog.log
LogFile %LOGFILE%
Moduledir %ROOT%\\modules
CacheDir %ROOT%\\data
Pidfile %ROOT%\\data\\nxlog.pid
SpoolDir %ROOT%\\data
Module xm_syslog
Module xm_exec
Module xm_json
Module im_internal
Exec $Message = to_json();
#######################################################################
##### This is just explicit version of internal input above ###########
#######################################################################
#
# Module im_file
# File '%LOGFILE%'
#
# $Message = $raw_event;
# if $Message == '' drop();
# $SourceName = substr(file_name(), size('%LOGDIR%') + 1);
#
#
#######################################################################
# Define Directory for Making Substring Operation
define LOGFOLDER C:\\ProgramData\\logs
Module im_file
File '%LOGFOLDER%\\*.log'
Recursive TRUE
$Message = $raw_event;
if $Message == '' drop();
$SourceName = substr(file_name(), size('%LOGFOLDER%') + 2);
Module im_msvistalog
Exec $Message = to_json();
Module pm_buffer
MaxSize 102400
Type disk
Path internal, filelog, eventlog => buffer => out
```
> You can add additional logfiles by creating a new `` section that imitates the previous ones, and adding the name of that section to `` at the end.
## Example for Tailing Additional Log Files
```none
Module im_file
File '%LOGDIR%\\example.log'
Exec $Message = to_json();
```
> Mezmo provides an integration with NXLog to collect, monitor, and analyze Windows event logs.