I just saw this recording about LogBox http://vimeo.com/26745005 - in order to get a better understanding about LogBox. Great Recording, thanks Brad and Luis.
I am setting up All errors thrown by the app to a DB which I can then view using Relax Logs (as suggested by Luis in the recording)
Now, this does log stuff to the DB properly but I think I haven't got the severity levels correct. How do I get my Handlers / Models to start logging as well?
So, in order to log only errors to the DB - what needs to be done?
In my handlers, I can do log.error() or log.warn() etc but how do I make it write the errors to the DB ? Can I use the onException() function to log stuff to the DB?
public void function onException(required Event)
{
var exceptionBean = Event.getValue(âExceptionBeanâ);
if(controller.getSetting(âenvironmentâ) neq âdevelopmentâ)
{
log.error(exceptionBean);
}
}
Error autowiring handlers.main. The DSL Definition {REF={null}, SCOPE={variables}, DSL={logBox:category:dblogger}, NAME={dblogger}, VALUE={null}, JAVACAST={null}, REQUIRED={false}} did not produce any resulting dependency The target requesting the dependency is: âhandlers.mainâ
On a side note, I have just started using relaxLogs to look at these DB Logs being written by LogBox. Which is all greatâŠ.but I was wondering RelaxLogs is pretty much a Log Viewer specific to LogBox and there could be a separate module called âLogViewerâ or something simply for looking at the LogsâŠ.for people who donât want all of the ârelaxâ functionality⊠or is there a reason this was put under ârelaxâ ?