<br><br><div class="gmail_quote">On Feb 11, 2008 10:04 AM, Ian Bezanson <<a href="mailto:irb@ianbezanson.ca">irb@ianbezanson.ca</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Ah, gotcha!<br><br>Thanks Khalid, I agree that this will be the best method for Drupal 6.x<br>+. I likely will leave my release as an option for Drupal 5.x (and not<br>bother porting it to 6), as I know that we've found it quite handy.<br>
I'll take a peek into the new functionality as we progress towards<br>Drupal 6.<br></blockquote><div><br>Check the links I sent.<br><br>The new hook for D6 is available for D5. Bryght (now RainCity Studios)<br>sponsored the work on this because they saw a lot of value in easing<br>
the load off the database.<br><br>So those who will use that for D5 have an assured migration path<br>to D6.<br><br>But your module is a dead end for D5.<br><br>Leave it out there, but point to the alternatives, caveats, options, ...etc.<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>I appreciate the info.<br><div><div></div><div class="Wj3C7c"><br>On Mon, 2008-11-02 at 09:58 -0500, Khalid Baheyeldin wrote:<br>
> Ian<br>><br>> The correct way to do this is to use the new watchdog hook that made<br>> it<br>> to Drupal 6.<br>><br>> Here is the API call<br>> <a href="http://api.drupal.org/?q=api/function/hook_watchdog/HEAD" target="_blank">http://api.drupal.org/?q=api/function/hook_watchdog/HEAD</a><br>
><br>> There are already standards in place for alert levels that the above<br>> hook<br>> and modules that call it can use.<br>><br>> There is a backport of that to Drupal 5.x here<br>> <a href="http://drupal.org/node/149341" target="_blank">http://drupal.org/node/149341</a><br>
><br>> The syslog module in the above patch, and in D6 can already log to<br>> a flat file, and the output is themable so you can format it however<br>> you like.<br>><br>> Here is an example module that does logging to email per severity<br>
> level.<br>> <a href="http://drupal.org/project/logging_alerts" target="_blank">http://drupal.org/project/logging_alerts</a><br>><br>> On Feb 11, 2008 8:03 AM, Ian Bezanson <<a href="mailto:irb@ianbezanson.ca">irb@ianbezanson.ca</a>> wrote:<br>
> And again...<br>><br>> The company I work for bases all of our projects on the Drupal<br>> infratructure. The watchdog application simply doesn't work<br>> for us, so<br>
> I'd created a module to log messages to file in the format:<br>><br>> 00:00:58 [module::function_name][LOG_LEVEL]: Checking to see<br>> if user<br>> 0c2f977cc24e4e41d8cd6d9a4099ab0b is anonymous.<br>
><br>> We've decided that this is likely a worthwhile project to<br>> release to the<br>> community, so I am currently working on a release. Right now,<br>> I have a<br>
> group of Log Levels (FATAL, ERROR, WARN, INFO, DEBUG, TRACE),<br>> one log<br>> type (DRUPAL_BASE) and the ability to add/configure more.<br>><br>> The site admin can configure whether or not to turn on<br>
> logging, a<br>> minimum log level to write out, where the log files should<br>> live, etc.<br>><br>> I will send another message once the initial release is made,<br>> but wanted<br>
> to gauge what people thought about this module. It's more of<br>> a<br>> developer's module, as it requires developers to add a hook,<br>> such as:<br>> drupal_log_to_file("MODULE_NAME::FUNCTION_NAME", "LOG_TYPE",<br>
> LOG_LEVEL, "MESSAGE")<br>><br>> into their code, in order for the system to log anything.<br>><br>> Let me know anyone's thoughts :)<br>><br>> --<br>> Ian Bezanson<br>
> <a href="mailto:irb@ianbezanson.ca">irb@ianbezanson.ca</a><br>><br>><br>><br>> --<br>> Khalid M. Baheyeldin<br>> <a href="http://2bits.com" target="_blank">2bits.com</a>, Inc.<br>> <a href="http://2bits.com" target="_blank">http://2bits.com</a><br>
> Drupal optimization, development, customization and consulting.<br></div></div>--<br><div><div></div><div class="Wj3C7c">Ian Bezanson<br><a href="mailto:irb@ianbezanson.ca">irb@ianbezanson.ca</a><br></div></div></blockquote>
</div><br><br clear="all"><br>-- <br>Khalid M. Baheyeldin<br><a href="http://2bits.com">2bits.com</a>, Inc.<br><a href="http://2bits.com">http://2bits.com</a><br>Drupal optimization, development, customization and consulting.