itsjustcurtis / MenyooSP

[or Menyoo PC] - Trainer/mod menu for Grand Theft Auto V (single-player).
https://www.gta5-mods.com/scripts/menyoo-2-0
GNU General Public License v3.0
36 stars 7 forks source link

Implement full debug and logging tools #34

Open itsjustcurtis opened 5 months ago

itsjustcurtis commented 5 months ago

Idea for future: implementation of PrintDebug() method in top level .cpp files; include string:message and int:debuglevel as parameters.

Message defines the message to be printed Debug level defines priority level of the message, if user debug is less than this value, do not print.

If debug level is sufficiently high, print to game screen.

Print debug method should include gameversion, menyoo version, debug level and timestamps of all print commands. Ideally any exceptions should be caught and logged.

itsjustcurtis commented 5 months ago

suggestion from #47

For example, when entering flying freecam mode a tooltip is displayed showing how to fly around. There's currently no option to disable it. Same when activating tasks, a tip pops up.

Suggest adding a toggle option to disable all tooltips to settings.

itsjustcurtis commented 4 months ago

debug loglevel added to local version, yet to commit until fully implemented. Intention to add filtering to log file writing script; Current setup writes directly to log file without prejudice

itsjustcurtis commented 4 months ago

Filtering added to only write to file if user debug level is above threshold. Conversion required for all existing log entries, then commit can be pushed

itsjustcurtis commented 4 months ago

Code updated to accept new logging method and user preference. Initial logs run prior to ini file being read, these have been altered to "INIT" level logging.

Yet to implement screen print debugging, though I think this should be a hidden function, not normally accessible without special knowledge (i.e. codeword entered to in-game cheat menu)

Menyoo version included in logs, game version is not.