react-native-file-logger
react-native-file-logger copied to clipboard
Logged file contains garbage text with some strange `PARSER_ERROR` error
I can see that the logs are perfectly fine when printed in the debug console. But for some reason when I check the log file in release mode, it contains such below garbage text throughout the file:
%PARSER_ERROR[msg]%PARSER_ERROR[n]%PARSER_ERROR[msg]%PARSER_ERROR[n]%PARSER_ERROR[msg]%PARSER_ERROR[n]%PARSER_ERROR[msg]%PARSER_ERROR[n]%PARSER_ERROR[msg]%PARSER_ERROR[n]%PARSER_ERROR[msg]%PARSER_ERROR[n]%PARSER_ERROR[msg]%PARSER_ERROR[n]%PARSER_ERROR[msg]%PARSER_ERROR[n]%PARSER_ERROR[msg]%PARSER_ERROR[n]%PARSER_ERROR[msg]%PARSER_ERROR[n]%PARSER_ERROR[msg]%PARSER_ERROR[n]%PARSER_ERROR[msg]%PARSER_ERROR[n]%PARSER_ERROR[msg]%PARSER_ERROR[n]%PARSER_ERROR[msg]%PARSER_ERROR[n]%PARSER_ERROR[msg]%PARSER_ERROR[n]%PARSER_ERROR[msg]%PARSER_ERROR[n]%PARSER_ERROR[msg]%PARSER_ERROR[n]%PARSER_ERROR[msg]%PARSER_ERROR[n]%PARSER_ERROR[msg]%PARSER_ERROR[n]%PARSER_ERROR
......
I started facing this issue abruptly, all my dependencies are unchanged. I am using an older version of react-native-file-logger: v0.3.0. I checked v0.4.0 version of this module as well, same issue there. v0.5.4 has some problems with pod install on RN version 0.68.7 that my project is using.
I observed this issue on both platforms: Android and iOS. But seems more prominent on Android.
Hello, PARSER_ERROR means that logback cannot encode your logs. This particular error is specific to Android, but you might get something similar in the iOS part. It seems that you are logging unrecognized object (maybe not UTF-8 characters?).
Can you provide a minimal repository that replicate the issue ?
@fdrault Thank you for the response, I will try to create a minimal repository and share it here.
I upgraded react-native version to 0.71.19, and the issue is no longer observed now. Closing this issue for now.