Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

inheritance.js 693B

1234567891011121314151617181920212223242526272829303132333435
  1. // eslint-disable-next-line import/no-extraneous-dependencies
  2. const log = require('loglevel');
  3. const prefix = require('../lib/loglevel-plugin-prefix');
  4. prefix.reg(log);
  5. log.enableAll();
  6. log.info('root');
  7. const chicken = log.getLogger('chicken');
  8. chicken.info('chicken');
  9. prefix.apply(chicken, { template: '%l (%n):' });
  10. chicken.info('chicken');
  11. prefix.apply(log);
  12. log.info('root');
  13. const egg = log.getLogger('egg');
  14. egg.info('egg');
  15. const fn = (level, name) => `${level} (${name}):`;
  16. prefix.apply(egg, { format: fn });
  17. egg.info('egg');
  18. prefix.apply(egg, {
  19. levelFormatter(level) {
  20. return level.toLowerCase();
  21. },
  22. });
  23. egg.info('egg');
  24. chicken.info('chicken');
  25. log.info('root');