slf4android
slf4android copied to clipboard
[Question] Unexpected log file content
I have a question about logger behavior.
I've added the logger init procedure in my Application class:
FileLogHandlerConfiguration fileHandler = LoggerConfiguration.fileLogHandler(this);
PackageManager m = getPackageManager();
String s = getPackageName();
try {
PackageInfo p = m.getPackageInfo(s, 0);
s = p.applicationInfo.dataDir;
} catch (PackageManager.NameNotFoundException e) {
}
String path = s + "/myapp.%g.%u.log";
Log.i("configLogger", "path: " + path);
fileHandler.setFullFilePathPattern(path);
LoggerConfiguration.configuration().addHandlerToRootLogger(fileHandler);
Then added a few log calls in some business logic:
private static final Logger logger = LoggerFactory.getLogger(SyncWorkerManager.class);
[...]
logger.info("Init");
only using INFO and ERROR log level. In the log file I found logs other than the one I wrote, like that:
2019.11.02 15:08:30.648 WARNING [main] FileHandlerExpose - Could not find field 'fileName' inside class class java.util.logging.FileHandler
2019.11.02 15:11:27.765 WARNING [FinalizerDaemon] com.couchbase.lite.database - SQLiteConnectionPool: A SQLiteConnection object for database '/data/user/0/my.app.package/files/app-flow.cblite2/db.sqlite3' was leaked! Please fix your application to end transactions in progress properly and to close the database when it is no longer needed.
How do they get collected?