Un ensemble de méthodes pour remplacer console.log(), console.warn() et console.error().
Usage
import { logger } from 'nr1'Méthodes
logger.error
function (message: string, JavaScript string containing zero or more substitution strings. To print the percentage sign, use double encoding (%%).
...params: Object[] JavaScript objects with which to replace substitution strings within message. This gives you additional control over the format of the output.
) => undefinedconst state = { foo: 42, bar: 'token' };
logger.error('Invalid state passed: %O', state);logger.log
function (message: string, JavaScript string containing zero or more substitution strings. To print the percentage sign, use double encoding (%%).
...params: Object[] JavaScript objects with which to replace substitution strings within message. This gives you additional control over the format of the output.
) => undefinedlogger.log('Hello, my name is %s', 'John Doe');logger.warn
function (message: string, JavaScript string containing zero or more substitution strings. To print the percentage sign, use double encoding (%%).
...params: Object[] JavaScript objects with which to replace substitution strings within message. This gives you additional control over the format of the output.
) => undefinedlogger.warn('Threshold exceeded by %d%%!', 35);