Yep that should set it up. How does one go about getting content into it. if it were java I would do... Logger logger = Logger.getLogger("package.classname");
if(error condition){ logger.error("Descriptive error text here to track down problem."); }
You want to log errors from your plugin into the logs/error-log textfile Good question. Maybe it's in the /docs how to do that, otherwise it should be in there (after we've figured it out how it works :-) )
You want to log errors from your plugin into the logs/error-log textfile Good question. Maybe it's in the /docs how to do that, otherwise it should be in there (after we've figured it out how it works :-) )
I'm not entirely sure, but I think what you want is:
throw new Exception($Msg, $Code);
$Code is optional and would be something like '404' if it's a page not found (and would redirect to that route accordingly), and the message would be what gets logged. I think? Have never looked at the error log, honestly, just shooting blindly based on the code I've seen.
Comments
$Configuration['Garden']['Errors']['LogEnabled'] = TRUE; $Configuration['Garden']['Errors']['LogFile'] = 'logs/error-log'; $Configuration['Garden']['Errors']['MasterView'] = 'deverror.master.php';
if it were java I would do...
Logger logger = Logger.getLogger("package.classname");
if(error condition){
logger.error("Descriptive error text here to track down problem.");
}
Good question. Maybe it's in the /docs how to do that, otherwise it should be in there (after we've figured it out how it works :-) )
There was an error rendering this rich post.
throw new Exception($Msg, $Code);
$Code is optional and would be something like '404' if it's a page not found (and would redirect to that route accordingly), and the message would be what gets logged. I think? Have never looked at the error log, honestly, just shooting blindly based on the code I've seen.