[Adium-devl] Logging Enhancements

George Armah armahg at gmail.com
Fri Aug 10 06:46:05 UTC 2007


Hello,

I would like to write a plugin that enables logging individually  per 
contact rather than the way it is set up now. (ref tickets #8, #6626, 
#2269).
After reading through the source I currently have two implementation 
options:

The first is to subclass AILoggerPlugin and have the new class uninstall 
the original plugin. The new class will be have exactly like the 
original plugin
until the user decides to disable / enable logging individually.

The second option is to use categories to do method swizzling with the 
methods under the -pragma mark Logging section in AILoggerPlugin. The new
methods would facilitate individual logging if a user chooses that 
option, they'll be identical to the old methods otherwise.


In terms of UI, from what I know, the only way for a user to modify per 
contact attributes using Adium's interfaces is via the contextual menu. 
(There are some
exceptions to this like Blocking). I plan to have Enable Logging and 
Disable Logging in the contextual menu and in the main menu bar under 
Contacts.
To avoid confusion, I'll have the Log Messages under General preferences 
override any plugin options ie. if you have it enabled then you can't 
log chats per contact.

Someone also mentioned on IRC that a better way to do this would be to 
modify AILoggerPlugin so that it has "hooks" other classes can use if 
they want to modify logging behavior. I haven't thought through this in 
detail but I'll look into doing these hooks for individual logging vs. 
normal logging settings.

I wanted to pass my plans by the devs here before starting actual code.


thanks in advance for feedback,

George.





More information about the devel mailing list