Logging Custom Error messages in SugarCRM

Depending on what your Log Level is set to in the system settings you can log errors to the sugarcrm.log located in the root folder with the following code snippets

$GLOBALS['log']->fatal("My fatal message");
 
$GLOBALS['log']->debug("My debug message");
 
$GLOBALS['log']->info("My log message"); 

Hope you find this blog post helpful.

Feel free to add comments and queries, that helps us to improve the quality of posts.

You can contact us at info@infotechbuddies.com

Thank you.

Spread the love

Leave a Reply

Your email address will not be published. Required fields are marked *