diff --git a/CHANGELOG.md b/CHANGELOG.md index d4caa3c..8efeb70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## [4.0.1] - 15-01-2022 + +- enable() and disable() methods can now enable or disable extensions + ## [4.0.0] - 03-01-2022 In this new major update many of the features requested in the previous issues have been fixed, introduced or improved: @@ -14,7 +18,6 @@ In this new major update many of the features requested in the previous issues h - from this version if no extensions are specified in the configuration then all are printed, otherwise only the specified ones - the colors option for the consoleTransport must now be set with the desired colors for each level (see the readme), if not set the logs will not be colored - removed css web color support (latest chrome versions support ansi codes) -- enable() and disable() methods can now only enable or disable the whole logger ## [3.0.4] - 04-06-2021 diff --git a/README.md b/README.md index d6b07aa..34c5bc5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,3 @@ -[![Build Status](https://travis-ci.org/onubo/react-native-logs.svg?branch=master)](https://travis-ci.org/onubo/react-native-logs) ![npm](https://img.shields.io/npm/v/react-native-logs.svg) ![GitHub](https://img.shields.io/github/license/onubo/react-native-logs.svg) [![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/onubo/react-native-logs/issues) @@ -146,7 +145,7 @@ whatever you want. The following parameters are received by the function: - `extension?: string | null`: its namespace if it is an extended log - `options?: any`: the transportOptions object -You can define your custom transport as follow (example in typescript): +You can define your custom transport as follow (example in typescript)ยง: ```javascript import { logger, transportFunctionType } from "react-native-logs"; @@ -418,18 +417,18 @@ import { logger, consoleTransport } from "react-native-logs"; const config = { transport: consoleTransport, - enabledExtensions: ['ROOT','HOME'] + enabledExtensions: ["ROOT", "HOME"], }; var log = logger.createLogger(config); -var rootLog = log.extend('ROOT'); -var homeLog = log.extend('HOME'); -var profileLog = log.extend('PROFILE'); - -log.debug('print this'): // this will print "