[How-To] (Developer's tool) Making the console output selectable with tail

[Description]

This is a guide for developers and anyone who wants to be able to access client’s console output in real time and select/copy from it without the annoyance of opening and closing logs from time to time.

I heard you like screenshots :smiley:

[How-To]

Step 1 - Have/Install git for windows

  • If you don’t already have this powerful tool, you can download it from here

Step 2 - Create this little sh script

  • Create a new file named CiticenFXLogger.sh at your FiveM Application Data directory
  • Open it with you prefered text editor and fill it with this.
tail -f CitizenFX.log -n 10000
  • From now on, by executing that script, a git console will open with the output of FiveM console

Step 3 - (optional) Accommodating the console size

  • Once you have it opened, right click on the title bar > Options… > Window | Edit it to your preference and save.
    I personally use 261x55 (embrace the power of odd numbers)


I hope this little ol’ trick helps some of you :wink:

4 Likes

Or just open the log file in Visual Studio Code or Vconsole2 :slight_smile:

6 Likes

@d0p3t

Does this provide live console logging? If so, visual studio might find a home on my PC once again.

Idk if things changed but i haven’t CitizenFX.log file in Fivem Application Data, so i using this to search inside /logs and prompt the last .log.

find ./logs -maxdepth 1 -name '*.log' -type f -printf '%T@:%p\0' |sort -rzn |sed -zn 's/[^:]*://p;q' |xargs -r0 tail -f -n 1000

Ty for your share without it i never thought this would be possible

1 Like