Hi,
I want to include a modified logcontrol.plist with a little test OXP I'm planning on asking a few members to test for me. If the logcontrol.plist is sat loose in the AddOns folder it is picked up by the game and the additional logging that is enabled is produced. If it is in the OXP's Config folder it is not picked up by the game....
I've double checked for any other logcontrol.plists in other OXPs and there aren't any.
Is this a bug or by design?
logcontrol.plist in OXP Config folder not read by game
Moderators: winston, another_commander, Getafix
- Capt. Murphy
- Commodore
- Posts: 1127
- Joined: Fri Feb 25, 2011 8:46 am
- Location: UK South Coast.
logcontrol.plist in OXP Config folder not read by game
Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Re: logcontrol.plist in OXP Config folder not read by game
It’s by design, but the situation has changed since the decision was made. At the time, OXPs couldn’t use custom log message classes, so an OXP logcontrol.plist could only modify default behaviour – most likely by enabling script debug logging, which would affect all OXPs.Capt. Murphy wrote:Is this a bug or by design?
I still don’t like the idea of an OXP changing built-in log message classes – distributing a loose file for testers would seem to cover the legitimate uses. However, with the current JS logging, an OXP could turn its own log messages off by default. Possibly we should allow OXP logcontrol.plists but ignore settings that override built-in keys (and their descendants).
E-mail: [email protected]
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Re: logcontrol.plist in OXP Config folder not read by game
I’ve been playing around with this, but there’s a problem of sorts: if an OXP disables its own log messages, they don’t show up in the log, but they do show up in the debug console. As I see it, this isn’t the Right Thing.Ahruman wrote:Possibly we should allow OXP logcontrol.plists but ignore settings that override built-in keys (and their descendants).
Proposed fix:
- If an OXP explicitly specifies a message class in a
log()
call, and that message class is disabled, the message doesn’t appear anywhere. - If no message class is specified, the behaviour is unchanged – it’s logged if [script.debug.message] is enabled, and printed in the debug console regardless.
E-mail: [email protected]