Questions tagged [log-messages]

Use it for questions about various types of logs in Drupal, including the ones shown in /admin/reports.

Filter by
Sorted by
Tagged with
0 votes
1 answer
39 views

How to catch the payload for bad POST requests with JSON:API?

When POSTing to JSON:API with invalid parameters, UnprocessableHttpEntityException is thrown. However, in the logs, this exception does not contain the invalid payload that caused the exception. How ...
-2 votes
1 answer
118 views

Drupal Core errors and logging

Looking for a way to suppress PHP errors that come from the Drupal core itself. Obviously, if the issue isn't being fixed in the core code base, we generally assume it's okay to ignore it and that it ...
user avatar
3 votes
1 answer
299 views

How to properly log custom exceptions?

I'm trying to improve the code quality of my custom module by adding custom exceptions. Before, I was lazy and throwing \Exception everywhere, but I recently refactored all my code to use custom ...
1 vote
1 answer
146 views

Logs full of "page not found" entries for various *.js.map files

Our Drupal 9 site is full of "page not found" warnings in the Drupal logs. All entries end in *.js.map (all map files). I cannot figure out where the warnings are coming from (what system is ...
  • 1,069
3 votes
1 answer
33 views

Selective cancellation from Watchdog

Can I selectively DELETE rows from watchdog? I have annoying errors and warnings I'm slowly getting rid of, but I would like to keep the history of user actions (create, update and delete on content). ...
0 votes
2 answers
1k views

Enable error logging from settings.php

I am facing a The website encountered an unexpected error. error while setting up the site. Most of the documentation I found online suggest to enable logging in the setting.php file. I added this ...
5 votes
1 answer
117 views

Extending contrib module filelog service class displays PSR implementation error

I wanted to override the logger.filelog service from filelog module to make use of my own parser. An error occurred through drush cim and drush cr when the new custom module that overrides the service ...
0 votes
1 answer
53 views

Site error on Drupal 9 on Acquia Dev Desktop [closed]

I am working on the Packt book Drupal 9 Module Development I finished the chapter 3 Here is the Github Link to the code When I call an url of admin part of my Drupal (I wanted to clear the cache) I ...
1 vote
1 answer
178 views

How to block the IP that requests excessive 404 page not found?

On my site often I see thousands of requests thats ends up 404 - page not found error. How can I block the IP that exceeds more than certain number of requests within a span of time from Drupal?
  • 157
1 vote
2 answers
336 views

Incorporating logs into Splunk

As of now we are running Drupal 8 and we would like to send the Drupal logs to Splunk. I have researched several plugins for Drupal that did such a thing, unfortunately they were all for Drupal 7 and ...
2 votes
1 answer
95 views

How can I capture Watchdog output during a functional test?

I have a functional test that is failing, and I think that there could be some useful information in the database log, but unfortunately the test suite only runs in containers on GitLab CI so I don't ...
0 votes
1 answer
112 views

Database log messages (auto cleaning) with keeping exceptions

I can see that the Drupal has a settings about logs to keep, but when some amount is configured, so after X logs, the oldest are deleted. Is there any option to make some logs not to be deleted?
  • 9
-2 votes
1 answer
75 views

Message shown in popup whenever any error log is registered

I want the administrator users to see a popup whenever an error log is generated. I researched and already completed the first step following Additional actions when logging using watchdog. ...
1 vote
0 answers
79 views

Database password revealed in PHP error_log?

Noticed some errors while updating to Drupal 8.9.11. As I'm reviewing I come across the following. Replaced the actual password with PASSWORD below. Is this intentional or a bug? I can't see why the ...
  • 93
-2 votes
1 answer
60 views

Message display in administration Repport and MySQL SELECT different

When look at log details from http://website/admin/reports/dblog/event/12599, it shows the following message. Starting execution of search_cron(), execution of node_cron() took 5.26ms. When I query ...
5 votes
1 answer
1k views

How can I output log messages to stdout/stderr?

I can create log messages really easily in Drupal 9.x like this; \Drupal::logger('mymodule')->error("something went wrong"); I see these messages appear in /admin/reports/dblog, but it ...
  • 548
3 votes
3 answers
346 views

How can I change the date format?

I'd like to change the Date format of recent log messages (/admin/reports/dblog) in Drupal 8.9.1 from short date to something with the time. In Drupal 7 using watchdog I just edited the view and it ...
1 vote
0 answers
871 views

Setting to disable database logging in dblog without disabling module

I am going through the dblog core module, but I can't seem to find a setting to disable database logging. Is there an option to disable the database logging without disabling the module? Also, are ...
  • 157
0 votes
1 answer
2k views

How to disable watchdog table entry?

My drupal 8 watchdog entry running very vastly. I want to stop the watchdog entry for few times immediate basis and resolve the issues. Please suggest.
  • 167
1 vote
1 answer
470 views

How can I keep logs of all outgoing emails?

I am using SMTP Authentication Support module to send emails with drupal 8.When I see watcdog mail-log from admin it shows only emails sent for registration or password reset, that is also with single ...
  • 125
0 votes
1 answer
522 views

How to log to console when in a Drupal attach behavior?

I'm using Drupal 7. I have the following code that tries to log to the console: function mymodule_get_jquery() { $jquery = <<<JAVASCRIPT console.log("here"); (function($) { ...
  • 295
1 vote
0 answers
96 views

Track/Log changes to permissions

I was trying to find contributed module for Drupal 8 to track practically everything users do on site. I was able to find some good modules like Events Log Track but it only works for entities (...
  • 936
4 votes
1 answer
382 views

How to suppress "page not found" messages in watchdog

The issue Add an option to suppress page not found watchdog messages at https://www.drupal.org/node/2836458 indicates that a setting was added to Drupal 8 to suppress page not found errors in watchdog....
1 vote
0 answers
74 views

How to log configuration changes in a sensible way?

In order to log simple configuration changes like a site-name change, contributed modules like contrib_log work fine. It just diffs the changes files in active configuration and logs it. But when ...
  • 1,933
0 votes
0 answers
25 views

How do I tell logging to ignore messages that I have seen?

I've got a couple of log messages that are coming out every few minutes. I can't fix them as they are just part of the system. How do I tell watchdog to ignore them?
  • 1,393
0 votes
0 answers
110 views

Error: Cron has not run recently. But it did!

I have a site (hosted on Acquia) which always return an error about cron not running on the Status report page, but it actually runs regularly and it does all the task attached to it. Cron is running ...
1 vote
1 answer
814 views

Create a view of the 'Recent Log Messages'

I would like to give an admin user (not User 1) permission to see the Recent Log Messages (/admin/reports/dblog), but I only want him to see 'User' logs. As it is a subscription website he could see ...
2 votes
3 answers
2k views

Additional actions when logging using watchdog

Is there a way to perform additional actions every time watchdog logs something? For example, I wanted to record, parse, and compile logs with additional information elsewhere, but still have watchdog ...
1 vote
0 answers
32 views

syslog to a different location for each site than on /var/log/syslog

We have many sites on our server and we are hoping that we can save syslogs of each site on the root of each site than all logs being dumped on /var/log/syslog Is it possible? For example, logs for ...
0 votes
1 answer
373 views

Why would my /admin/reports/dblog get "stuck" on only showing "page not found" errors? [closed]

Edit #2: Ok, I finally logged out of my admin account, restarted the browser, then logged back in. Presto! Works. Now that I've thoroughly embarrassed myself, I'll just bow out and go hide underneath ...
4 votes
2 answers
8k views

How can I log(watchdog)?

In D7 is used to log using Watchdog function. In D8, I see its gone and I should use something called the logging API. What I a trying to do: I have created a menu/route, mysite.com/logmessage When ...
  • 481
0 votes
1 answer
88 views

Do not show errors including database error to users in D7

I have disabled displaying errors to the user in my D7 website. See below the screenshot of the configuration- However, I (without admin login) still see a database related error such as following- ...
  • 283
0 votes
1 answer
163 views

Can Drupal site logout user when he change IP Address?

Can Drupal site logout user when he change IP Address or ask user to confirm password again? I need to implement follow requirements: Log source IP address changes during application sessions. ...
2 votes
2 answers
170 views

Is there a way to see what fields are used in Rules?

There is an field list overview in the reports for Views that shows the fields used. Here is a sample of it: Is there a quick way to find out which fields are used with Rules? It would be enough to ...
  • 339
2 votes
2 answers
400 views

How to track the published/unpublished status for node revisions?

I am ultimately looking for a way to create a report in Views showing what nodes were active on the site at what times but thus far have been unable to accomplish this. I've done a fair bit of ...
3 votes
1 answer
38 views

Is there any way to tell when a user's password was changed?

A user tried to log on today and discovered that his password had mysteriously been changed. All I can assume is that he left his computer unattended and someone changed it. Is there any way to tell ...
  • 1,013
2 votes
0 answers
326 views

How to limit what is logged in syslog

I changed error logging so that errors are being written to /var/log/drupal.log, switching from using Drupal's dlog to syslog, following these instructions, in order to reduce resources used to write ...
  • 1,627
0 votes
0 answers
139 views

Can't log to Windows Events with syslog

Problem: Our production server has IIS 7.5 (windows server 2008). Syslog is enabled in Drupal. And works perfectly fine logging to Unix server syslog file. However, on the IIS (which doesn't have ...
  • 3,115
4 votes
3 answers
3k views

Set the effective log severity level

In a Drupal 8 site, on the page /admin/config/development/logging, I can specify if I want warnings, errors and other messages to be displayed. But either I want them displayed or not, they exist. On ...
  • 471
0 votes
1 answer
79 views

Is `watchdog-show string` broken in 7.56?

On a test instance, drush watchdog-show shows, among three other entries, a message starting with "Notice: Undefined property:". However, both of the following commands print nothing at all: drush ...
  • 103
0 votes
1 answer
36 views

How can I filter sensitive data being recorded in calls to Watchdog

I have sensitive data that is sent to a Drupal instance and I don't want it to be logged. I can filter out sensitive values with simple string replacements for my own calls to watchdog(), but for PHP ...
0 votes
1 answer
118 views

Generate reports of similar web forms results

In Drupal 7, I want to generate a report of similar webforms (same fields but created 2 webforms to handle multilingual translations) results. All the fields in my both webforms are same. I tried to ...
  • 251
3 votes
1 answer
462 views

How do I deal with discounts/refunds and a payment gateway to achieve accurate reporting for accounting?

First off, this seems like a fairly basic function required for ecommerce. I was presented with a question today: "Will our new website give reporting so accounting can be done from within the ...
5 votes
3 answers
1k views

Why Recent log message is showing anonymous user?

Whenever I do cron/clear cache, that activity are shown as anonymous in log message, while my login activity are shown with my name as shown in following image. Should not be user be ...
  • 3,713
5 votes
4 answers
1k views

Debug arrays from hook_cron?

Does anybody know of the proper way to debug objects from within hook_cron? I'm trying to set up a task that periodically deletes backups from my private folder, but I can't properly debug arrays that ...
  • 1,851
1 vote
1 answer
2k views

How to stop Watchdog from logging "DEBUG" errors?

I get this error in my logs a lot: Deprecated function: Methods with the same name as their class will not be constructors in a future version of PHP; views_many_to_one_helper has a deprecated ...
  • 1,029
1 vote
1 answer
2k views

Why do I get a Drupal\Core\DependencyInjection\ContainerNotInitializedException exception error?

I am using Drupal 8.1.3, Drush 8.1.7, and PHP 5.6.2 on a Mac OS X. I've installed a fresh Drupal 8 site demo from Zircon on a local MAMP stack. When I try to run watchdog show, and some other ...
  • 1,627
4 votes
3 answers
2k views

Suppress watchdog a specific log message

I would like to tell watchdog not to write the "Cron run completed" to the log while leaving all other messages intact. How can I do this? Thanks!
1 vote
2 answers
146 views

Is there a way to suppress warnings on the D8 Status Report page?

On my D8 status report (admin/reports/status) I have warnings about an issue I might wish to ignore. Is there any way to suppress the warnings on that report page once I have seen them and made my ...
  • 305
0 votes
1 answer
118 views

Watchdog reports many spammy looking page not found warnings

Periodically, I like to run the following command to see what kind of activity and errors are going on with our website in real time. drush ws --tail --full Every second or so, there is a page not ...
  • 1,627