We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [logging]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3
votes
1answer
226 views

How do I prevent secrets beeing logged in the PHP error log?

Background: I'm running Craft Pro 3.1.19 on PHP 7.2.15 Craft CMS, by default, uses vlucas/phpdotenv to get the configuration (containing secrets / credentials and lots of other stuff) from .env ...
1
vote
1answer
50 views

Custom plugin log not logging

I'm having this weird issue that both of my custom plugin logs are not working but all other third party ones including craft.log work fine. By 'not working' I mean the log file is generated, but ...
1
vote
2answers
132 views

Is it possible to stop Craft from logging so much?

I've got a Craft CMS installation that is set to production mode. I notice that my logs get flooded with a bunch of entries which don't seem very useful. For example, in a matter of several days, I'...
1
vote
2answers
73 views

wp-login.php bloating log files every 20-30 seconds

Hi has anyone come across this before. It seems like a hack attempt on the site from a bot trying to access it as a wordpress site. This is obviously causing loads of errors in the log files bloating ...
4
votes
2answers
2k views

Craft CMS 3.0 - Log file?

I've been playing around with Craft 3.0 and am just about to develop a site using it. First thing I see when testing my frontpage template is "Internal server error", styled as a Craft error box. So ...
1
vote
1answer
179 views

Craft on Heroku is not logging. How can I make it start?

I don't have any logs appearing in craft/storage/runtime/logs (in fact I don't have anything at all in craft/storage/runtime. I'm running Craft on Heroku. I've tried setting post-install scripts in ...
2
votes
0answers
463 views

Does Craft expose PHP errors when not in devMode? [closed]

I'm seeing a lot of tasks hanging in Craft. Specifically, DeleteStaleTemplateCaches and GeneratePendingTransforms. I've followed the advice and instructions at https://craftcms.com/support/stuck-tasks ...
2
votes
1answer
235 views

Is it possible to output Profiling Summary Report (devMode)

Is it possible to output Profiling Summary Report when in devMode? Looking to print this out onto a template: Time: 0.36980s Memory: 20,563Kb Total Queries: 19
2
votes
1answer
63 views

Why can't we log items regardless of dev mode?

Unfortunatley we need to develop an Import plug-in helper with dev mode OFF, for - according to Brad at P&T: devMode uses a lot more memory on a given PHP request and importing probably ...
1
vote
1answer
4k views

Getting PHP errors to log in Nginx/PHP-FPM

Under Nginx/PHP-FPM, I can't get PHP errors logged to craft/storage/runtime/logs/phperrors.log as they should be. Initially, errors weren't logging anywhere, but I discovered I needed: ...
2
votes
1answer
2k views

Craft Error Logging not doing anything?

I have a plugin called EducatorEntriesPlugin, and in the controller of the plugin, I have a method called actionExportEducator. In this method, I am logging an error using the code below, but when the ...
1
vote
0answers
236 views

Showing Profiling Summary Report data in the frontend

I'm trying to debug why certain pages on a site are slow using the 'Profiling Summary Report' data that is logged to the console when devMode is enabled. For easy viewing, I've tried to output the ...
1
vote
1answer
521 views

Enable craft.log for console commands [closed]

I've got devMode enabled and can see the log happening in craft/storage/runtime/logs/craft.log for browser requests... but was wondering if there is a way to enable this level of logging (detailing ...
4
votes
1answer
106 views

When should I log in a plugin?

With regards to logging in your own plugin, is there a point which could be considered "You are logging too much" For example. In a service I currently have something like this: public function ...
4
votes
1answer
1k views

How can I get a full stack trace in my custom plugin log?

I'm using MyPlugin::log to separate the errors for my plugin. However, I'm only able to log a simple message using this technique. Is it possible to have that output the full stack trace? Here's ...
1
vote
1answer
35 views

Is it possible to configure the FileLogRoute?

I am trying to debug a "clean template cache" task that gets stuck. However, it only happens intermittently, and whenever I notice any errors has already been rotated out of the log files. Is there ...
3
votes
1answer
90 views

Flushing logs halfway through a request?

Sometimes I have long running requests that do imports or similar. Currently logging using MyPlugin::log is only actually written to file once the request is done. Is there a way to trigger log-...
2
votes
1answer
107 views

Logging from Bootstrap mode?

We've been using bootstrap.php to have a basic PHP file run parts of some content-sync from a plugin we've written. The sync is run from cron and this works great. BUT - when the sync runs from ...
2
votes
1answer
303 views

Can I disable logging 404 errors in my craft.log file?

I want to get a better understanding of some issues in production surrounding timeouts but as its a high traffic site the craft logs get replaced about every 15 minutes due to the amount of 404's that ...