Translations:Setting up a Multiplayer Server/75/ru

From Vintage Story Wiki
Revision as of 14:42, 3 December 2020 by Zybillo (talk | contribs)

Используйте свой любимый инструмент для создания конфигурационного файла rsyslog (в этом примере используется nano)

 nano /etc/rsyslog.d/vintagestoryserver.conf

Вставить следующее содержимое

 if $programname == 'VSSRV' then {
     if($msg contains "Chat") then {
         action(type="omfile" dirCreateMode="0755" FileCreateMode="0644" File="/var/log/vintagestory-server/chat.log")
     } else if($msg contains "verließ") then {
         action(type="omfile" dirCreateMode="0755" FileCreateMode="0644" File="/var/log/vintagestory-server/login.log")
     } else if($msg contains "join") then {
         action(type="omfile" dirCreateMode="0755" FileCreateMode="0644" File="/var/log/vintagestory-server/login.log")
     } else if($msg contains "Server Warning") then {
         action(type="omfile" dirCreateMode="0755" FileCreateMode="0644" File="/var/log/vintagestory-server/warn.log")
     } else if($msg contains "Server Notification") then {
         action(type="omfile" dirCreateMode="0755" FileCreateMode="0644" File="/var/log/vintagestory-server/info.log")
     } else if($msg contains "Server Debug") then {
         action(type="omfile" dirCreateMode="0755" FileCreateMode="0644" File="/var/log/vintagestory-server/debug.log")
     } else if($msg contains "Server Event") then {
         action(type="omfile" dirCreateMode="0755" FileCreateMode="0644" File="/var/log/vintagestory-server/event.log")
     } else {
         action(type="omfile" dirCreateMode="0755" FileCreateMode="0644" File="/var/log/vintagestory-server/other.log")
     }
 }
 # Discard 
 if $programname == 'VSSRV' then ~

8. перезапустить rsyslog / включить службу Чтобы активировать rsyslog и ваш сервер vintagestory введите следующие команды

 systemctl restart rsyslog.service;
 systemctl enable vintagestoryserver.service
 systemctl start vintagestoryserver.service