Showing posts with label override. Show all posts
Showing posts with label override. Show all posts

Sunday, January 28, 2018

Developer Centric Logging

A few weeks ago I wrote some posts about overriding the CRON handler and I showed code about Developer Communication.   Since then I have talked to a few people and they all wanted to know what that cryptic function call did so I thought I would look into releasing it.   When I looked at the code I realized that I could not release it as it was crap.  So I took a week and rewrote it into this.  What we have here is a custom logger.  I found scant few examples of custom loggers on the internet so I hope someone finds this useful.

I think it adds all the missing pieces into SugarCRM's SugarLogger function like timers, headers, line tracing, email, and notifications.

Sunday, January 14, 2018

Overriding MysqliManager.php

Overriding the stock SQL Managers


It took me a while to figure out how to override the core MysqliManager class so that I could add some code to email me the SQL errors that usually just go to my logs.  At first I tried just creating the custom file, expecting it to be read like others I had created, but I found that you actually  have to tell the system to use your custom class in the config_override.php file like this