Translations:Setting up a Multiplayer Server/75/ru: Difference between revisions

From Vintage Story Wiki
(Created page with "Используйте свой любимый инструмент для создания конфигурационного файла rsyslog (в этом примере...")
 
No edit summary
Line 23: Line 23:
   # Discard  
   # Discard  
   if $programname == 'VSSRV' then ~
   if $programname == 'VSSRV' then ~
'''8. restart rsyslog / enable service'''
'''8. перезапустить rsyslog / включить службу'''
To activate rsyslog and your vintagestory server type these commands
Чтобы активировать rsyslog и ваш сервер vintagestory введите следующие команды
   systemctl restart rsyslog.service;
   systemctl restart rsyslog.service;
   systemctl enable vintagestoryserver.service
   systemctl enable vintagestoryserver.service
   systemctl start vintagestoryserver.service
   systemctl start vintagestoryserver.service

Revision as of 14:42, 3 December 2020

Information about message (contribute)
This message has no documentation. If you know where or how this message is used, you can help other translators by adding documentation to this message.
Message definition (Setting up a Multiplayer Server)
Use your favourite tool to create a rsyslog config file (this example uses nano)
  nano /etc/rsyslog.d/vintagestoryserver.conf
Insert the following content
  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 ~

Используйте свой любимый инструмент для создания конфигурационного файла 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