Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Unexpected log file content #19

Open
PaoloneM opened this issue Nov 2, 2019 · 0 comments
Open

[Question] Unexpected log file content #19

PaoloneM opened this issue Nov 2, 2019 · 0 comments

Comments

@PaoloneM
Copy link

PaoloneM commented Nov 2, 2019

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant