|
From: SourceForge.net <no...@so...> - 2005-04-11 16:43:18
|
Patches item #1180568, was opened at 2005-04-11 05:14 Message generated for change (Comment added) made by kstange You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=300235&aid=1180568&group_id=235 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Kevin Stange (kstange) Assigned to: Nobody/Anonymous (nobody) Summary: Expose Gaim Common Logger Functions Initial Comment: We have several "common" logger functions in gaim, including a write, list, and size function, which I believe we should expose to the API so that users can place log files with different file extensions in the same log heirarachy as Gaim already uses. I see no reason why we shouldn't encourage other logging formats to store logs in the default locations. I expose four functions: gaim_log_common_writer() which opens a file for the log (the work of actually writing to the file is to be done by the coder) gaim_log_common_lister() which gets a list of logs with a specific extension gaim_log_common_sizer() which takes a gaim_log that uses the common_writer and sizes it. gaim_log_get_log_dir() which allows someone to get the default log locations that Gaim uses in the built in logger to create, read, list, or otherwise poke and prod logs. I also add a struct GaimLogCommonLoggerData which provides the basic logger data used by the common writer/lister/sizer functions, but has an extra_data member that still lets the logger add his own custom data. This is two patches. One for oldstatus will work for 1.3.0 because it exposes new API but it does not remote any old API. This actually leaves behind a function that was accidentally not static because it can't be removed for now. The second patch is for 2.0.0 and it cleans up the couple things that were exposed on the API that needed to be removed. Someone might want to double check that I didn't mistakenly damage the API or ABI of 1.3.0 in unacceptable ways. ---------------------------------------------------------------------- >Comment By: Kevin Stange (kstange) Date: 2005-04-11 12:43 Message: Logged In: YES user_id=726342 Oh, and I don't know if that was ever the plan to encourage other loggers to use the log directory, but I think we should. Even if it's a single database or something, it could still go in .gaim/logs and that way plugin authors can aim to always have your logs exactly where you'd expect them. Of course, this makes backing up your Gaim settings, logs, and other data nice and easy too. We've got this code in Gaim and it's already nice and generic so it makes a lot of sense to me to save people some work. ---------------------------------------------------------------------- Comment By: Kevin Stange (kstange) Date: 2005-04-11 12:15 Message: Logged In: YES user_id=726342 I hate to have to reroll the patches for those changes. Maybe someone would just make those two changes in each tree for me before committing? ;) ---------------------------------------------------------------------- Comment By: Richard Laager (rlaager) Date: 2005-04-11 11:53 Message: Logged In: YES user_id=156487 For gaim_log_common_lister and gaim_log_common_sizer, the end of the documentation says "with gaim_log_common_writer". That should say "with gaim_log_common_writer()". Adding the parentheses should allow Doxygen to recognize it as a function name and make a link. If both this is accepted, I need to think about if the log_get_log_sets_common function in 1180490 should be exposed. If we're going to encourage other loggers to store things in the log directory, I'd like to change my patch a bit. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=300235&aid=1180568&group_id=235 |