If I'm reading the code of the module correctly, it logs to the database directly. If I understand it correctly, it also looks like it uses watchdog() just below the database write? I noticed that there's possibly a variable that we can set to override the shutdown function, but that seems a bit convoluted. Would it be possible to disable logging to the database and just use watchdog()

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sillygwailo created an issue. See original summary.

dannycodes’s picture

I've thrown together a small patch that checks to see if the module syslog is enabled. If it is then the $record is sent through watchdog. Otherwise it uses drupal_write_record as it normally would.

Filename should end with 7.x-3.x. Just a typo in the filename.

dannycodes’s picture

Status: Active » Needs review
Sarwar Zahan’s picture

Fixed the watchdog passing parameters to log the service request in syslog.

Derimagia’s picture

Status: Needs review » Needs work

Thanks for your help here.

I like this but I don't like how it checks to enable this.. Whether the syslog module is enabled seems generic. Syslog has a has a 1kb limit as well.

I'm thinking the best way of implementing this is by having 2 settings, "Call watchdog" and "Write to database". "Write to database" is the default, while Call watchdog is not enabled. Someone can enable both or one if they want to.

rvtraveller’s picture

I agree with @Derimagia. Special-casing syslog doesn't make a ton of sense to me because there are plenty of other logging implementations that a user might be using.

+1 to the 2 different settings. That way those people who are running a more "vanilla" site with just a standard LAMP stack can make use of the database search. Those folks who are running more complex stacks with syslog and Splunk/ELK/whatever (and I 100% believe that you should be using one of those if you are using syslog logging) can log to their more complex workflow that lets them do graphs and charts and such.

texas-bronius’s picture

What's the decision here, and how can I help? It's not clear to me from OP and comments above what "write to database" might mean. And we are only talking about meta logging of service API activity, not the actual request/response/details of the call that Services Log will still handle in DB all the time?

-Bronius