Disable method is not working for extensions
turbomonkey opened this issue · 2 comments
turbomonkey commented
I tried to use the disable method on an extension but cannot get it to work. It just disables all logging. Could you please provide an example? Thanks!
import { logger, consoleTransport } from "react-native-logs";
const config = {
transport: consoleTransport,
enabledExtensions: ['ROOT','HOME']
};
var log = logger.createLogger(config);
var rootLog = log.extend('ROOT');
var homeLog = log.extend('HOME');
log.disable('HOME');
log.disable(homeLog);
rootLog.info('Magenta Extension and bright blue message');
homeLog.error('Green Extension and bright red message');
alessandro-bottamedi commented
Sorry, I'll fix this in the next few days
alessandro-bottamedi commented
Fixed in ver 4.0.1, see the example in the README.