flashflashrevolution / rCubed

Official Flash Flash Revolution game engine.
https://www.flashflashrevolution.com
GNU Affero General Public License v3.0
31 stars 17 forks source link

Extended Logger #255

Closed Psycast closed 3 years ago

Psycast commented 3 years ago

Adds a Logging class capable of tracing to the console, and also writing to a log file in the application folder. The included information in the log includes the log level, the time since startup, the class calling the logger, and the printed message.

This PR also replaces the few existing traces with more information and the majority of URL loading in the event of connection issues.

This class can also be enabled on select release builds to help debug a specific users issue.

Example:

0:[00:01][Language] Load Success
0:[00:01][Site] Load Success
0:[00:01][Playlist] Load Success
0:[00:02][Playlist] Parsed 2595 songs.
0:[00:02][User] Ranks Load Success
0:[00:03][LoginMenu] Attempting session login for: ***
0:[00:04][LoginMenu] Login Success!
0:[00:04][User] Profile Load Success
0:[00:04][Site] Load Success
0:[00:04][Playlist] Load Success
0:[00:05][Playlist] Parsed 3010 songs.
0:[00:05][User] Ranks Load Success
0:[00:07][Song] Music Load Success
0:[00:07][Song] Using Cached File
0:[00:07][Song] Chart Load Success
0:[00:07][Song] Chart parsed with 59 notes, 02:17 length.
1:[00:08][GamePlay] Posting Start of level 328
1:[00:08][GamePlay] Post Start Load Success = success
1:[00:16][GameResults] Canon Score Save Success
1:[00:16][GameResults] Score Save Result: 0