MEGAMIND

  • Hero Member
  • Developer of Webnet Official
  • Posts: 783
Server_log.txt
«  »
Ive noticed alot that server_log.txt only gets filled up when pressed ctrl+c other then this if u close it via close button or x button the logs arent created why?

DizzasTeR

  • VC:MP Beta Tester
  • Infinite loops defy infinity by overflowing memory
  • Posts: 1,156
Re: Server_log.txt
« Reply #1,  »
Because the logs aren't flushed until CTRL + C is pressed which is the command to "Close the server normally"

The close button terminates it without actually signaling it to clean everything up so it doesn't flush to the file the log contents.

Thats what I think happens.

MEGAMIND

  • Hero Member
  • Developer of Webnet Official
  • Posts: 783
Re: Server_log.txt
« Reply #2,  »Last edited
Quote from DizzasTeR on October 17th, 10:38 AM
Because the logs aren't flushed until CTRL + C is pressed which is the command to "Close the server normally"

The close button terminates it without actually signaling it to clean everything up so it doesn't flush to the file the log contents.

Thats what I think happens.
Your exactly right, i tried using a batch script to
Code: [Select]
taskkill /im server.exe
which terminates it directly, isnt there any other method to send somekeys like ctrl+c to close it gracefully and fetch the logs

habi

  • Sr. Member
  • Posts: 280
Re: Server_log.txt
« Reply #3,  »
does ShutdownServer() works?

MEGAMIND

  • Hero Member
  • Developer of Webnet Official
  • Posts: 783
Re: Server_log.txt
« Reply #4,  »Last edited
Quote from habi on October 17th, 02:53 PM
does ShutdownServer() works?
yes but didint exported any logs out, btw i wanna try it out with a batch script or php of possible