winnitron / WinnitronLauncher

The official Winnitron launcher! The meat and potatoes of the Winnitron.
winnitron.com
MIT License
34 stars 7 forks source link

Log levels #67

Closed aaronklaassen closed 7 years ago

aaronklaassen commented 7 years ago

The output_log.txt file gets spammed with a lot of messages that make it hard to sift through if you're looking for what went wrong with your setup. Add some levels so that one can opt out of (for example) debugging/dev messages, normal state changes, etc.

Levels are debug, info, warn, and error. Default is info.

So rather than doing this: GM.dbug.Log("message"); for everything, now:

GM.logger.Debug("just debuggin'");
GM.logger.Info("launching game: something.exe");
GM.logger.Warn("missing a file but fear not we can recover");
GM.logger.Error("oh no something went wrong!");
aaronklaassen commented 7 years ago

@mrmwiebe FYI, for the next time you work on this.

mrmwiebe commented 7 years ago

oo hey that's a great idea 👍