/*jshint esversion:6*/
'use strict';
var Application = require('..').Application;

//config here is a gkeypath Wrapper instance
var config = Application.loadConfig({}, true);

var app = new Application({config});

console.log(app.banner);

app.onceRegistered('dispatcher', ()=>{
    app.chainEvents(['run.pre', 'run',], ['error']).then(()=>{
        app.logger.debug('A) RUN.PRE AND RUN DONE!');
    }).catch();

    app.chainEvents(['run.pre', 'run', 'run.post'], ['error']).then(()=>{
        app.logger.debug('B) RUN.PRE, RUN AND RUN.POST DONE!');
    });
});

app.once('run.complete', function(e){
    console.log('run.complete: ', e);
});

app.once('run.pre', function(e){
    console.log('run.pre: ', e);
});

app.once('run.post', function(){
    this.register(require('debug')('application-core'), 'debug');
    app.logger.debug('--------');
    app.logger.debug(this.name);
    app.logger.debug(this.nicename);
    app.logger.debug('--------');

    let err = new Error('This is a sample error!!!');
    app.logger.error(err.stack);
});


app.once('coreplugins.ready', ()=>{
    app.run();
});
// app.run();

@@ -595,34 +595,39 @@
 ion(e)%7B%0A    
-console.lo
+app.logger.debu
 g('run.compl
@@ -684,34 +684,111 @@
     
-console.log('run.pre: ', e
+app.logger.debug('run.pre: ', e);%0A    app.logger.debug('TEST LOGGER: %25s', e, %7Bage:23, name:'Pepe Rone'%7D
 );%0A%7D
@@ -1079,32 +1079,34 @@
 error!!!');%0A    
+//
 app.logger.error

fix looger