dr:logging
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
dr:logging [2006/04/09 15:35] – created fgm | dr:logging [2006/04/09 15:58] – fgm | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Logging module ====== | ====== Logging module ====== | ||
+ | |||
+ | ===== The suggestion ===== | ||
Currently, various modules within core and contrib use various tables to store historical (i.e. "write once, read sometimes, never update" | Currently, various modules within core and contrib use various tables to store historical (i.e. "write once, read sometimes, never update" | ||
Line 52: | Line 54: | ||
} | } | ||
</ | </ | ||
+ | * Eventually recorder functions fulfill their recording contract as they wish using the original function arguments. Having the recordee name as first parameter allows the recorder function to be potentially unique for several recordees. | ||
+ | |||
+ | ===== Why bother ? ===== | ||
+ | |||
+ | This came from a need initially met with the current Zeitgeist module: there is, as of Drupal 4.7RC2, no formal way to register searches being performed. Chatting on irc:// | ||
+ | |||
+ | The mere idea of adding code to search.module just to support zeitgeist, which is a contrib module (and not even a major one), seemed utterly illogical, although just adding _zeitgeist_store_search() within search.module/ | ||
+ | |||
+ | Considering this, I suggested a hook for search recorders, that could be used by any module wishing to record search queries, and not just zeitgeist. But discussion showed this was not felt to be sufficiently general to be upheld. | ||
+ | I then thought on, and considered what sort of a more general contract-based mechanism could be used, that would both be extremely simple to use by recordees, so as to not affect them, and flexible enough to accomodate more general needs than just recording searches. This is the first draft of the result. |
dr/logging.txt · Last modified: 2020/11/23 17:23 by 127.0.0.1