Logging with the JS7 Logger
JS7 - JavaScript Jobs can use the JS7 Logger like this:
Example for implementation of JS7Job with JavaScript
class JS7Job extends js7.Job { processOrder(js7Step) { js7Step.getLogger().info( 'hello world' ); js7Step.getLogger().warn('.. logging a warning'); js7Step.getLogger().error('.. logging an error'); js7Step.getLogger().debug('.. logging debug output'); // do some stuff } }
Explanation:
- The
js7Step.getLogger()
object is provided that offers related methods for logging. - For details see JS7 - Job API.
Logging with the Console Logger
JavaScript Jobs can use the Console Logger like this:
Example for implementation of JS7Job with JavaScript
class JS7Job extends js7.Job { processOrder(js7Step) { console.info('.. logging an information'); console.log('.. logging an information'); console.warn('.. logging a warning'); console.error('.. logging an error'); console.debug('.. logging debug output'); // do some stuff } }
Further Resources
Overview
Content Tools