2017-01-11 2 views
0

Ich versuche derzeit, eine Protokolldatei mit NXLog an einen Remote-Server zu senden. Ich habe das richtig funktioniert. Meine nächste Herausforderung ist, dass sich das Datum täglich in der Logdatei ändert. Zum Beispiel würde es am ersten Tag log.20170110 und am nächsten Tag log.20170111 sagen. Ich möchte, dass meine NXLog-Konfiguration eine Datumsvariable am Ende des Protokolls haben kann. Ist das möglich. Meine aktuelle Konfiguration ist unten.NXLog - Eingabe txt-Datei mit Datum am Ende

define ROOT C:\Program Files (x86)\nxlog 
Moduledir %ROOT%\modules 
CacheDir %ROOT%\data 
Pidfile %ROOT%\data\nxlog.pid 
SpoolDir %ROOT%\data 
LogFile %ROOT%\data\nxlog.log 

<Extension syslog> 
Module xm_syslog 
</Extension> 

<Input in> 
Module im_file 
File 'C:\Temp4\log.20170104.txt' 
SavePos TRUE 
</Input> 

<Output out1> 
Module om_tcp 
Host 10.10.10.10 
Port 5166 
</Output> 


<Route 1> 
Path in => out1 
</Route> 

Jede Hilfe würde sehr geschätzt werden.

Danke,

SG

Antwort

0

Die folgende Beschreibung ist für die Arbeit:

File 'C:\Temp4\log.*.txt'