Using the standalone console version of Woodman

This page uses the standalone console version of Woodman and does not require any additional AMD loader or library. By definition, that version only supports the console Appender.

This page also illustrates the use of the console shortcut as config parameter to have Woodman send everything to the console using the specified pattern.

<script type="text/javascript" src="../../dist/woodman-console.js"></script>
<script type="text/javascript" src="console.js"></script>

The standalone version exposes Woodman in window.woodman. The console.js file can access it directly:

woodman.load('console [%c] %m', function (err) {
  if (err) throw err;

  var logger = woodman.getLogger('browser.console');
  logger.log('Welcome to Woodman');
  logger.info('This is an info message');
  logger.warn('This is a warning');
  logger.error('This is an error');
});

Open your console to see the result!