In a clustered environment it's very useful to add some information to watchdog about the server who triggered an event. For example you want to know on which web server a php or database error occurred.

I attached a patch that adds two values to watchdog:
- server_addr contains the ip address of the server
- server_name contains the name of the virtual host.

This patch is a port of the issue #671052: Add Information about server to watchdog (D6).

BTW I'm not yet familiar with drupal 7. So somebody should review that port please.

Comments

Status: Needs review » Needs work

The last submitted patch, watchdog_server_info.patch, failed testing.

mkalkbrenner’s picture

Status: Needs work » Needs review
StatusFileSize
new6.48 KB

I adjusted the patch to be applicable against Drupal core 7.0.

Status: Needs review » Needs work

The last submitted patch, 671070.patch, failed testing.

naxoc’s picture

Version: 7.x-dev » 8.x-dev

Moving to 8

alansaviolobo’s picture

I believe this is related. can someone please confirm ?
Add "Machine" column in overview to display hostname, and a hostname filter

mkalkbrenner’s picture

Status: Needs work » Closed (duplicate)

In the meantime the hostname is already part of the log entry in Drupal 8.