# |
Jul 12th 2017, 08:39 |
neon1024 |
I’ve never really understood the log levels properly. I always had trouble splitting stuff out, and found they always overlapped |
# |
Jul 12th 2017, 08:38 |
dereuromark |
write one :slightly_smiling_face: |
# |
Jul 12th 2017, 08:38 |
birdy247 |
:+1: |
# |
Jul 12th 2017, 08:37 |
neon1024 |
It would be super nice to be able to configure logging and error handling on an HTTP code basis |
# |
Jul 12th 2017, 08:37 |
dereuromark |
yeah, its still not part of the core, even though I highly recommend it :slightly_smiling_face: |
# |
Jul 12th 2017, 08:36 |
birdy247 |
I presume I would need a custom error handler to do that? |
# |
Jul 12th 2017, 08:36 |
neon1024 |
But many of our sites are medium term, so it’s not really viable in most cases |
# |
Jul 12th 2017, 08:35 |
neon1024 |
I guess we really should have a Cake plugin which implements Logstash, and pushes all the logs into a log server |
# |
Jul 12th 2017, 08:35 |
neon1024 |
We don’t really do much with logging at my work because we have so many sites |
# |
Jul 12th 2017, 08:35 |
neon1024 |
Yeah, that’s a good idea :slightly_smiling_face: |
# |
Jul 12th 2017, 08:34 |
birdy247 |
@dereuromark neon1024 I like the idea of logging them to a seperate file |
# |
Jul 12th 2017, 08:34 |
neon1024 |
Although if you don’t log 404's you’ll miss them all |
# |
Jul 12th 2017, 08:34 |
jonasz |
it could be... i did sth similar, let me check |
# |
Jul 12th 2017, 08:34 |
neon1024 |
https://book.cakephp.org/3.0/en/core-libraries/logging.html#logging-configuration |
# |
Jul 12th 2017, 08:33 |
neon1024 |
You can change the logging configuration |
# |
Jul 12th 2017, 08:28 |
birdy247 |
Something like this |
# |
Jul 12th 2017, 08:28 |
birdy247 |
https://stackoverflow.com/questions/22607461/cakephp-error-log-can-i-exclude-404-errors?answertab=votes#tab-top |
# |
Jul 12th 2017, 08:27 |
jonasz |
there are probably many other requests..hmm i would look for some logic which would ignore those from a particular ip if it is always the same ip |
# |
Jul 12th 2017, 08:25 |
jonasz |
so it is good practice to check it out in access log for relevant ip. that might be an attempt of port scanning etc |
# |
Jul 12th 2017, 08:25 |
birdy247 |
yes |
# |
Jul 12th 2017, 08:25 |
jonasz |
@birdy247 I presume those errors are caused by some penetration scans running on your app |
# |
Jul 12th 2017, 08:24 |
jonasz |
morning all |
# |
Jul 12th 2017, 08:21 |
birdy247 |
like /wp-login.php 5 million times |
# |
Jul 12th 2017, 08:20 |
birdy247 |
Is there anyway to stop 404 errors filling up my error logs? |
# |
Jul 12th 2017, 08:07 |
birdy247 |
Mornning neon1024 |
# |
Jul 12th 2017, 08:00 |
johnwayne |
@dakota Thank you! :slightly_smiling_face: |
# |
Jul 12th 2017, 07:54 |
casmo |
https://book.cakephp.org/3.0/en/plugins.html#autoloading-plugin-classes |
# |
Jul 12th 2017, 07:53 |
casmo |
You might add 'autoload' => true |
# |
Jul 12th 2017, 07:53 |
casmo |
Psr\Http is a core class or something you enabled throught Plugin::load() in the bootstrap? |
# |
Jul 12th 2017, 07:53 |
casmo |
That caches the loading vendors |
# |
Jul 12th 2017, 07:52 |
casmo |
No, composer generated an autoload file if I remember correctly |
# |
Jul 12th 2017, 07:44 |
neon1024 |
Morning everyone |
# |
Jul 12th 2017, 07:43 |
rad87 |
wouldn't that cause the problem on a local machine as well? |
# |
Jul 12th 2017, 07:42 |
casmo |
The autoloader |
# |
Jul 12th 2017, 07:42 |
casmo |
Or composer might not be updated |
# |
Jul 12th 2017, 07:41 |
casmo |
Maybe the /vendor folder? |
# |
Jul 12th 2017, 07:40 |
rad87 |
Hello. I'm having a problem. My app works just fine on my local machine but when deployed to the server all I get is an error message saying "Error: Interface 'Psr\Http\Message\ServerRequestInterface' not found ". Any idea what is missing on that server? |
# |
Jul 12th 2017, 07:34 |
birdy247 |
Should it just be '' |
# |
Jul 12th 2017, 07:33 |
birdy247 |
when attempting to access a restricted page |
# |
Jul 12th 2017, 07:33 |
birdy247 |
but since upgrading to 3.4 I always see the "You are not authorized" |
# |
Jul 12th 2017, 07:33 |
birdy247 |
I have authError => false in my AppController for the Auth Component |