Looks very cool! Something that is sorely lacking in Oblivion's scripting language. SetGlobalLogLevel - probably not a good idea, as one poorly done mod can disable all logs and you as a developer will spend some time to figure out why your logs are not working as expected. Better move this option to some config file.
It would also be nice if Log functions would determine plugin name and script name, and also have a function for setting logging pattern for each mod. So, for example, you can do this: SetLogPattern "[%modname] [%scn] [%logLevel] - %msg" "MyMod.esp" Logd "My message"
And get this log: [MyMod.esp] [MyScript] [DEBUG] - My message
Also, is there any runtime overhead created by log function that writes on higher levels than currently configured level?
1 comment
SetGlobalLogLevel - probably not a good idea, as one poorly done mod can disable all logs and you as a developer will spend some time to figure out why your logs are not working as expected. Better move this option to some config file.
It would also be nice if Log functions would determine plugin name and script name, and also have a function for setting logging pattern for each mod. So, for example, you can do this:
SetLogPattern "[%modname] [%scn] [%logLevel] - %msg" "MyMod.esp"
Logd "My message"
And get this log:
[MyMod.esp] [MyScript] [DEBUG] - My message
Also, is there any runtime overhead created by log function that writes on higher levels than currently configured level?