Skip to content

Instantly share code, notes, and snippets.

@klarstil
Created October 21, 2020 11:42
Show Gist options
  • Save klarstil/cad3ab50294446de5dbbafe2bd59bc92 to your computer and use it in GitHub Desktop.
Save klarstil/cad3ab50294446de5dbbafe2bd59bc92 to your computer and use it in GitHub Desktop.
import Plugin from 'src/plugin-system/plugin.class';
// Import logger
import { log } from '@missionlog';
// Initializing the logger
log.init({ initializer: 'INFO' }, (level, tag, msg, params) => {
console.log(`${level}: [${tag}] `, msg, ...params);
});
// The plugin skeleton
export default class ExamplePlugin extends Plugin {
init() {
console.log('init');
// Use logger
log.info('initializer', 'example plugin got started', this);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment