Wie kann ich Minecraft ' s Log in rsyslog bekommen?
Minecraft hat eine Protokolldatei wie diese:
2012-10-27 21:45:47 [INFO] Starting Minecraft server on *:25565
2012-10-27 21:45:47 [INFO] Preparing level "../worlds/world3"
2012-10-27 21:45:48 [INFO] Preparing start region for level 0
2012-10-27 21:45:49 [INFO] Preparing spawn area: 16%
2012-10-27 21:45:50 [INFO] Preparing spawn area: 41%
2012-10-27 21:45:51 [INFO] Preparing spawn area: 75%
2012-10-27 21:45:51 [INFO] Done (4.082s)! For help, type "help" or "?"
2012-10-27 21:46:06 [INFO] foo[/12.34.56.78:50371] logged in with entity id 661 at (64.03178036049653, 76.0, -53.74201593751356)
2012-10-27 21:46:13 [WARNING] Can't keep up! Did the system time change, or is the server overloaded?
Kann diese Protokolldatei von rsyslog überwacht werden? Es scheint, dass das imfile-Modul alle Nachrichten in eine Schweregradgruppe einfügt und nicht so aussieht, als würde es die Zeit verwenden. Ich bin neu in Syslog, also fehlt mir vielleicht etwas Offensichtliches.
2
1 answers
Fügen Sie es einfach als beliebige Datei zu Syslog hinzu
In /etc/rsyslog.conf
fügen Sie $ModLoad imfile
hinzu.
Erstellen Sie dann eine minecraft.conf
- Datei für minecraft ' s Logs in /etc/rsyslog.d
mit den Importdefinitionen:
$InputFileName /mine/logs/latest.log
$InputFileTag minecraft
$InputFileStateFile minecraft-file1
$InputFileSeverity info
$InputFileFacility local7
$InputRunFileMonitor
$InputFilePersistStateInterval 500
Spielt immer noch damit, um das Protokoll ein wenig aufzuräumen
2
Author: Jeroen Kool,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/techietown.info/template/agent.layouts/content.php on line 61
2016-02-22 20:52:26
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/techietown.info/template/agent.layouts/content.php on line 61
2016-02-22 20:52:26