logger icon indicating copy to clipboard operation
logger copied to clipboard

Can not log in release mode ?

Open zKidor opened this issue 3 years ago • 4 comments

Hi,

In release mode , the logger can not log anything , the file is empty. In debug mode ,it can log into file .
Is there something wrong with my usage ? How can I fix this? Thank you !

logger init:

logger = Logger(
        printer: PrettyPrinter(
            methodCount: 2,
            // number of method calls to be displayed
            errorMethodCount: 8,
            // number of method calls if stacktrace is provided
            lineLength: 120,
            // width of the output
            colors: true,
            // Colorful log messages
            printEmojis: true,
            // Print an emoji for each log message
            printTime: true // Should each log print contain a timestamp
            ),
        output: FileOutput(
            file: logFile));

usage:

logger.d('msg');

zKidor avatar Jul 22 '21 12:07 zKidor

Logger is disabled in production, see: https://github.com/leisim/logger/issues/48#issuecomment-634555147

Tobivaria avatar Jul 22 '21 19:07 Tobivaria

Logger is disabled in production, see: #48 (comment)

Got it! Thank you so much

zKidor avatar Jul 23 '21 01:07 zKidor

@Tobivaria How can I make it visible in release mode.

CyberWake avatar May 24 '22 08:05 CyberWake

@Tobivaria How can I make it visible in release mode.

filter: ProductionFilter()

dgurudot avatar Sep 30 '22 11:09 dgurudot