Hi everyone,
In SuiteCRM 8.5.0, I have found in logs/prod/ 2 files :
prod.deprecations.log
prod.log
While prod.log is around 300Mb, the fiel prod.deprecations.log was around…18.5Gb !!
I have renamed the file and put an empty file with the same name to avoid issue, check if all was alright on the CRM and then removed the huge file.
Ok, this working.
But… the file is growing again : since the replacement with an empty file, the file is already at 12,1Mb…
I have checked the file while it is “small”, all inside are indeed “deprecated”.
My question is simple : as “deprecated” is worthless right now for me, can I stop SuiteCRM to generate this specific log file ?
I already have in my php to log only error and fatal but this not stop SuiteCRM to generate this log file…
Well… I have to come back to correct what I wrote : dont remove the file prod.deprecations.log !
It breaks some internal page in the CRM on my side : the dashboard, the admin function (not the admin directly but all the internal page like “repair”, etc…).
I had to fetch back a backup from this night to get all back working normally…
So, my question is still there : how to get rid of this huge file without breaking the crm ??
I come back also here for a simple question : can i “clean” (empty the file) the huge log prod.deprecations.log safely ?
Now, the file have a size of…17Gb…
I never tried it but I guess it’s ok to delete. Start by just renaming it to something else, if after a while you see that nothing goes wrong, and a new file is created with the newer deprecation messages being generated now, then you know it’s ok to delete the old huge file.
Then I checked over at Symphony for any hints towards logfile deletion etc.
Finally I found a hint at SO - which might not apply to SuiteCRM, but there are some people asking for it and deleting log files:
A neat feature would probably be an inbuild log rotate:
So I just tried and emptied the file (not deleted, just emptied it) and it seems, my CRM is still happy.
Just like with a log rotate, the CRM writes into the empty file now and so far, I haven’t found any issues popping up in the CRM (8.6.1)
I have found also these links but as SuiteCrm is “touchy” when a file is changed, I was waiting for your expert eyes
The deprecated log is full of this kind of line :
[2024-08-06 10:41:11] php.INFO: User Deprecated: Since api-platform/core 2.7: Use “ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface” instead of “ApiPlatform\Core\Metadata\Resource\Factory\ResourceMetadataFactoryInterface”. {“exception”:“[object] (ErrorException(code: 0): User Deprecated: Since api-platform/core 2.7: Use "ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface" instead of "ApiPlatform\Core\Metadata\Resource\Factory\ResourceMetadataFactoryInterface". at /home/xxxx/xxxx/vendor/api-platform/core/src/Symfony/EventListener/DeserializeListener.php:63)”} []
And even with directive in config/packages/prod/monolog.yaml. like this at the end of the file :
Ok,
So far, as soon i rename the deprecation log, the system recreate a new one, that’s ok.
But as soon I do this, I loose the Dashboard (nothing shown but the menu is working) and several part are also not responding (Studio, etc…).
I’m restoring the version before I change this… I dont understand what is happening, it shouldn’t mess the crm like this…
Xavier
I’ve actually not deleted the file, I’ve just emptied the content … (after making a copy)
vi prod.deprecations.log // sudo -u www-data vi in case you want to edit as the www-data user
:%d
:w! // Enter for saving the file
But it should work if you simply create the file with the correct permission as well.
I haven’t changed anything in configs / yaml or similar, the rest is just a standard Ubuntu LAMP server.
is there finally a Solution for stop writing out the deprecation-logs?
Nothing i change on the monolog.yaml file seems to have any effekt.
I tried to change simple thinks in config like changing the Filename of the deprecated-log, but it is ignored by the logger.
Hi Hiesscher,
I’m sorry, but on my side, I have to go back to a V7 which have not this issue.
So, no solution found on my side and no success with the monolog.yaml on my side too.