<br><br><div class="gmail_quote">On Feb 11, 2008 10:04 AM, Ian Bezanson &lt;<a href="mailto:irb@ianbezanson.ca">irb@ianbezanson.ca</a>&gt; 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>+. &nbsp;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&#39;ve found it quite handy.<br>
I&#39;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>
&gt; Ian<br>&gt;<br>&gt; The correct way to do this is to use the new watchdog hook that made<br>&gt; it<br>&gt; to Drupal 6.<br>&gt;<br>&gt; Here is the API call<br>&gt; <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>
&gt;<br>&gt; There are already standards in place for alert levels that the above<br>&gt; hook<br>&gt; and modules that call it can use.<br>&gt;<br>&gt; There is a backport of that to Drupal 5.x here<br>&gt; <a href="http://drupal.org/node/149341" target="_blank">http://drupal.org/node/149341</a><br>
&gt;<br>&gt; The syslog module in the above patch, and in D6 can already log to<br>&gt; a flat file, and the output is themable so you can format it however<br>&gt; you like.<br>&gt;<br>&gt; Here is an example module that does logging to email per severity<br>
&gt; level.<br>&gt; <a href="http://drupal.org/project/logging_alerts" target="_blank">http://drupal.org/project/logging_alerts</a><br>&gt;<br>&gt; On Feb 11, 2008 8:03 AM, Ian Bezanson &lt;<a href="mailto:irb@ianbezanson.ca">irb@ianbezanson.ca</a>&gt; wrote:<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; And again...<br>&gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; The company I work for bases all of our projects on the Drupal<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; infratructure. &nbsp;The watchdog application simply doesn&#39;t work<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; for us, so<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; I&#39;d created a module to log messages to file in the format:<br>&gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; 00:00:58 [module::function_name][LOG_LEVEL]: Checking to see<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; if user<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; 0c2f977cc24e4e41d8cd6d9a4099ab0b is anonymous.<br>
&gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; We&#39;ve decided that this is likely a worthwhile project to<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; release to the<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; community, so I am currently working on a release. &nbsp;Right now,<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; I have a<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; group of Log Levels (FATAL, ERROR, WARN, INFO, DEBUG, TRACE),<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; one log<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; type (DRUPAL_BASE) and the ability to add/configure more.<br>&gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; The site admin can configure whether or not to turn on<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; logging, a<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; minimum log level to write out, where the log files should<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; live, etc.<br>&gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; I will send another message once the initial release is made,<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; but wanted<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; to gauge what people thought about this module. &nbsp;It&#39;s more of<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; a<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; developer&#39;s module, as it requires developers to add a hook,<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; such as:<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;drupal_log_to_file(&quot;MODULE_NAME::FUNCTION_NAME&quot;, &quot;LOG_TYPE&quot;,<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; LOG_LEVEL, &quot;MESSAGE&quot;)<br>&gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; into their code, in order for the system to log anything.<br>&gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; Let me know anyone&#39;s thoughts :)<br>&gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; --<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; Ian Bezanson<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; <a href="mailto:irb@ianbezanson.ca">irb@ianbezanson.ca</a><br>&gt;<br>&gt;<br>&gt;<br>&gt; --<br>&gt; Khalid M. Baheyeldin<br>&gt; <a href="http://2bits.com" target="_blank">2bits.com</a>, Inc.<br>&gt; <a href="http://2bits.com" target="_blank">http://2bits.com</a><br>
&gt; 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.