Console Logging and Log Functions for the Masses
version 9.0
Requires http://obse.silverlock.org/
Download : http://www.tesnexus.com/downloads/file.php?id=26510
Description
Bah ! These useless mod authors are always asking for something or the other when it comes to bug reports. Load order, OBSE version, bashed patch status, sixual orientation, Oblivion version and non-existent error logs to name a few. Bah !
May your head fall off at an awkward moment if such a thought were to ever pass through it, verbatim or otherwise.
Until then, consider using ConScribe ?
Fine Print
ConScribe is an OBSE plugin that supersedes speedo's long-since-gone Console Logger. It logs all console output to text files for later reviewing, including those typed in by the player. It removes the need for modders to adopt independent logging functions.
ConScribe supports 3 logging modes:
- Per Game Load; and
- Per Game Session
- Static Logging
Console logs are saved to a folder named "ConScribe Logs" in your Oblivion root directory and each log is named in accordance to the time of its creation.
ConScribe also adds, as contradictory in terms as it may seem, independent log functions that allow mods to log output to text files. Output is primarily segregated into 2 types:
- Logs made per script – Output is grouped by the parent script
- Logs made per mod – Output is grouped by the parent mod
An INI file of the same name is created in the same directory as the plugin, on first run. Logging modes can be switched by changing the ScribeMode INI key's value. Usable Modes/Values:
- PerLoad - Per Game Load
- PerSession - Per Game Session
- Static – Static Logging
String INI values are case-insensitive. The plugin needs a valid logging mode to work. The other INI options include:
- TimeFormat – The format string used to generate log headers.
- Includes/Excludes - Message filtering strings. Includes-keywords must be present in a console message to be logged. Similarly, Excludes-keywords mustn’t be present in the console message if it has to be logged. Multiple keywords should be separated by a semi-colon. [ Example – osr;piiip;error; ]
- LogBackups – Number of log file ( only those in the Per-Mod and Per-Script folders ) backups kept by the plugin. A value of -1 will enable append mode for the logs, similar to the Static Log. A maximum of 5 backups are allowed.
- RootDirectory – The path to the directory in which ConScribe stores its logs. A value of Default is equivalent to the path of Oblivion’s Data directory.
Command List
Scribe - Primary output function. Prints output to a log file and, optionally, to the console.
(nothing) Scribe formatString:string var1 var2 ... var20 printToConsole:bool
RegisterLog - Registers a log name with the calling mod.
(nothing) RegisterLog formatString:string var1 var2 ... var20 defaultFlag:bool
UnregisterLog - Unregisters the calling mod's log, if any.
(nothing) UnregisterLog formatString:string var1 var2 ... var20 defaultFlag:bool deleteLog:bool
GetRegisteredLogName - Retrieves the calling mod's registered log. Returns "null" if there isn't any.
(logName:string) GetRegisteredLogName
ReadFromLog – Retrieves the log's contents.
(logContents:array) ReadFromLog formatString:string var1 var2 ... var20
DeleteSliceFromLog – Deletes a slice of lines for a registered log.
(result:int) DeleteLinesFromLog formatString:string var1 var2 ... var20 lowerLimit:int upperLimit:int
GetLogLineCount - Returns the number of lines of text in the registered log.
(lineCount:int) GetLogLineCount formatString:string var1 var2 ... var20
Detailed command list - http://cs.elderscrolls.com/constwiki/index.php/Category:ConScribe
Compatibility
This plugin is compatible with every other OBSE plugin with the exception of ConLog (Console Logger). Using both at once will create duplicate logs.
Credits
Special thanks to :
- Ian Patterson, Stephen Abel and Paul Connelly (The OBSE Team) – For keeping up the Oblivion Modding spirit and providing the modding community with TES4 Oblivion's Elixir of Immortality. And for the API.
- LHammonds – For his Readme generator
- Speedo – For releasing the first console logger
- Scruggsywuggsy the ferret – For lots of stuff
- Kyoma - For spamming in the discussion thread
The Folks at the Construction Set Forums – For all their help, rum and fish.
The Rest of the Modding Community – For the inspiration I needed to start modding and all the wonderful mods which I use.
Bethesda – For providing a great game, with enough flaws to keep us busy.
Change Log
- New Commands : GetLogLineCount, DeleteLinesFromLog
- RegisterLog returns -1 when it fails
- Fixed a bug that prevented UnRegisterLog from deleting the default log when log name was passed as '*.*'
- Fixed a memory leak in the ReadFromLog handler
- Moved default log directory inside the Data folder to increase compatibility with installers. Existing logs need to be moved manually.
- Rewrote the INI manager as a new library
- Optimised ReadFromLog handler
- Temporarily removed support for CSE’s IntelliSense
8.0b - Fixed a bug introduced in the last update that prevented scribe from working
8.0a -
- Fixed a bug in serialization code
- Added missing console printing code to Scribe’s handler
- Rewrote plugin internals
- Removed the alternate INI path added in 7.0.0.5
- Fixed up INI format (forthelasttimedammit)
- Removed the 24 hour clock INI setting in lieu of a format string
- Made the log directory changable through an INI setting
- Added interop support for the OBSE plugin Construction Set Extender
- Standardized serialization record format to allow expansion and backward compatibility in later builds;
Records saved by previous builds are automatically converted - Released source code
- Log headers are no longer appended on unregistered logs during load callbacks
- Scribe allows the pipe character in its string argument as long as one is appended as the log name delimiter
- Log directory is accepted as an alternate parent directory to the INI file
- The static log is also backed up now
- Support for multiple logs
- Ability to read from logs
- Can optionally delete logs while unregistering them
- Changed the INI format (for the last time … hopefully)
- Fixed a potential bug in the plugin load callback.
- Fixed a bug that kept script logs from being appended with headers
5.0 - Some code moved around, modified and rewritten; Changes to the INI; New log functions
4.0 - Decided to have ice cream for dessert
3.0a - Fixed a null pointer crash
3.0 - Replaced Prefix notation with an INI file; Option to use 24 Hour time notation in log names
2.0 - Renamed prefix PerGame to PerSession ; Added new prefix PerSessionEx
1.0 - Initial Release
Mods that use ConScribe
- http://www.gamesas.com/index.php?/topic/1088059-relz-refscope-20/
- http://www.gamesas.com/index.php?showtopic=1068205