Logging
We inject a LogBox logger into all cbwire Components to provide you with built-in logging.
1
component extends="cbwire.models.Component"{
2
3
function mount(){
4
log.info( "mount() called" );
5
}
6
7
function someAction(){
8
log.debug( "someAction() called" );
9
}
10
11
}
Copied!
You can also access the LogBox parent object using getLogBox().
1
component extends="cbwire.models.Component"{
2
3
function mount(){
4
var logbox = getLogBox();
5
var logger = logbox.getRootLogger();
6
log.info( "Logging with the root logger!" );
7
}
8
9
}
Copied!
Last modified 2mo ago
Copy link
Edit on GitHub