June 2018
Intermediate to advanced
348 pages
8h 19m
English
By default, Aurelia has the logging API already in their dependencies, so you don't need to run any npm command at this point. Of course, if for some reason that library is missing, you know how to deal with it.
First, we need to create a file to configure our log levels. In the resources folder, create a file called custom-log-appender.js. This name is completely optional; you can name it in the most convenient way.
First, let's configure all our log levels:
export class CustomLogAppender { constructor(){} debug(logger, message, ...rest){ console.debug(`DEBUG [${logger.id}] ${message}`, ...rest); } info(logger, message, ...rest){ console.info(`INFO [${logger.id}] ${message}`, ...rest); } warn(logger, message, ...Read now
Unlock full access