Sign in to follow this  
Followers 0

InfiSTAR log "ordner"

5 posts in this topic

Hey Leute

Ich habe eine kleine frage, weiß einer von euch wie man es hin bekommt das infiSTAR einen "Log" Ornder erstellt wo dann alle Logs drin sind?

so langsam ist nämlich mein ArmA 3 Server verzeichnis voller infiSTAR log Datein. Ich weiß im Forum von infiSTAR gibt es einen .dll welche alles log in einer Datei speichert, jedoch ist das Forum von infiSTAR ja derzeit nicht verfügbar.



Share this post

Link to post
Share on other sites

Mach doch beim restart des Servers eine Logrotation und kopier alles in einen ordner mit format YYYY-MM-DD HH:II:SS

Share this post

Link to post
Share on other sites
@echo off
:: Based off of Server Launch Script by r4z0r49
:: Script Modified and fixed by Sykotix -
:: Day of the week Added By Raziel23x -
:: Usage: dayzsrv-log-rotater.bat servername
:: Example 1 - Will update using default profile: dayzsrv-log-rotater.bat 
:: Example 2 - Will update using profile for US6: dayzsrv-log-rotater.bat US6

:::::::::::::: CONFIG ::::::::::::::::::

:: Set your Arma2AO Base installation directory. LEAVE OFF THE ENDING \
set arma2srvpath=C:\arma3exile

:: Set your Default server profile name. This is the name of the directory that stores your server.cfg
:: This will be used in the case that you don't launch this script without the server param.
:: Example: cfgdayz, US6, Chicago13, ect
set srvname=sc2

:: Delete Original log files after they have been rotated? This keeps your logs more organized and saves space.
:: This will not work unless the server is stopped first. This option works best set to 1 when using FireDaemon's Pre/Post Service tab
set deloriglogs=1

::::::::::: ADVANCED CONFIG ::::::::::::
:: Don't touch anything below this point unless you know what your doing.

:: Setting Server Profile to Use
IF "%1"=="" (
set servername=%srvname%
) else (
set servername=%1

TITLE  DayZ %servername% Server Log Rotater

:: Set Debug Mode
set debug=0
:: Set Debug Timeout in seconds
set dbsecs=10

:::::::::::::::::::::::::::  STOP EDITING ::::::::::::::::::::::::::::::::::::::

:: Set Time and Date
set today=%date:~-4%-%date:~-7,2%-%date:~-10,2%-%time:~-11,2%_%time:~-8,2%-%time:~-5,2%

echo Starting Log Rotation %today%.

:: Make the Rotated Log Directorys
if exist "%arma2srvpath%\%servername%\RotatedLogs" goto maketsdir
mkdir "%arma2srvpath%\%servername%\RotatedLogs"
if exist "%arma2srvpath%\%servername%\RotatedLogs\%today%" goto makebedir
mkdir "%arma2srvpath%\%servername%\RotatedLogs\%today%"
if exist "%arma2srvpath%\%servername%\RotatedLogs\%today%\BattlEye" goto rotatelogs
mkdir "%arma2srvpath%\%servername%\RotatedLogs\%today%\BattlEye"

:: Starting Log Rotation. If there are any other logs, just follow the format below, and make sure to NOT touch any of the varibles.
copy "%arma2srvpath%\%servername%\arma3server_*.rpt" "%arma2srvpath%\%servername%\RotatedLogs\%today%\"
copy "%arma2srvpath%\%servername%\server_*.log" "%arma2srvpath%\%servername%\RotatedLogs\%today%\"

echo Logs are backed up now...
echo Removing original log files.
del /Q /F "%arma2srvpath%\%servername%\arma3server_*.rpt"
del /Q /F "%arma2srvpath%\%servername%\server_*.log"

:: We're done here.


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.