On Feb 11, 2008 10:04 AM, Ian Bezanson <irb@ianbezanson.ca> wrote:
Ah, gotcha!

Thanks Khalid, I agree that this will be the best method for Drupal 6.x
+.  I likely will leave my release as an option for Drupal 5.x (and not
bother porting it to 6), as I know that we've found it quite handy.
I'll take a peek into the new functionality as we progress towards
Drupal 6.

Check the links I sent.

The new hook for D6 is available for D5. Bryght (now RainCity Studios)
sponsored the work on this because they saw a lot of value in easing
the load off the database.

So those who will use that for D5 have an assured migration path
to D6.

But your module is a dead end for D5.

Leave it out there, but point to the alternatives, caveats, options, ...etc.

I appreciate the info.

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



--
Khalid M. Baheyeldin
2bits.com, Inc.
http://2bits.com
Drupal optimization, development, customization and consulting.