Jump to content

Change LOG file


XFawkes

Recommended Posts

Posted

Depends if you find another way rather than edit the mtaserver.conf file. If you edit that file you need to restart in order to update the paths, I don't think there is another way to do that since you won't change those paths very often.

Posted

I do made an easy EXE program which changes the mtaserver.conf file using the real time date, but I don't want to restart server (even during night time, because still 4-5 players at server)

Posted

You can't load that file during runtime, it only loads on server start which obviously require a restart as well, 4-5 players isn't any problem, a restart goes fast, just tell them to reconnect soon in the console before you restart and they'll come back.

Posted

Hmm I didn't tested the idea I just came out.

What IF I dont change the log file directory, but I modify the file.

lets say I have logs in: /logs/server.log

Program copies the file everyday at 0:00 to: /logs/server_RRRR_MM_DD.log and clears /logs/server.log

So the server.log have saved logs since 0:00 this day to 'now' all the time

So the destination doesn't need to be changed. I am just wondering if this will actually work? I will check the idea tomorrow

Posted

I guess it'll work on a Linux system, on Windows I'm afraid the server locks the file and makes it read only but you could try of course. Not the best solution maybe but it could work, the copying part will work at least. A quick test would be to remove the log during runtime, see what happens, if it's even possible and so on.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...