mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-25 19:36:50 +01:00
Fix logging configuration
Make sure to not invoke any logging before it is properly configured.
This commit is contained in:
parent
49cc4ec9d6
commit
a1f60aab91
@ -23,13 +23,15 @@ public class GBApplication extends Application {
|
|||||||
|
|
||||||
public GBApplication() {
|
public GBApplication() {
|
||||||
context = this;
|
context = this;
|
||||||
mActivityDatabaseHandler = new ActivityDatabaseHandler(context);
|
// don't do anything here, add it to onCreate instead
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
|
|
||||||
|
// don't do anything here before we set up logging, otherwise
|
||||||
|
// slf4j may be implicitly initialized before we properly configured it.
|
||||||
setupLogging();
|
setupLogging();
|
||||||
// For debugging problems with the logback configuration
|
// For debugging problems with the logback configuration
|
||||||
// LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
|
// LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
|
||||||
@ -37,6 +39,7 @@ public class GBApplication extends Application {
|
|||||||
// StatusPrinter.print(lc);
|
// StatusPrinter.print(lc);
|
||||||
// Logger logger = LoggerFactory.getLogger(GBApplication.class);
|
// Logger logger = LoggerFactory.getLogger(GBApplication.class);
|
||||||
|
|
||||||
|
mActivityDatabaseHandler = new ActivityDatabaseHandler(context);
|
||||||
// for testing DB stuff
|
// for testing DB stuff
|
||||||
// SQLiteDatabase db = mActivityDatabaseHandler.getWritableDatabase();
|
// SQLiteDatabase db = mActivityDatabaseHandler.getWritableDatabase();
|
||||||
// db.close();
|
// db.close();
|
||||||
|
Loading…
Reference in New Issue
Block a user