refactor logging

This commit is contained in:
Chakib Ben Ziane 2018-10-28 20:26:38 +01:00
parent 3877268508
commit a0c1e6845e
3 changed files with 3 additions and 3 deletions

View File

@ -103,6 +103,7 @@ func (bw *ChromeBrowser) Watch() bool {
if !bw.isWatching {
go WatcherThread(bw)
bw.isWatching = true
log.Infof("<%s> watching changes", bw.name)
return true
}

3
db.go
View File

@ -562,7 +562,7 @@ func initDB() {
if err != nil {
log.Warning(err)
}
log.Debugf("localdb exists, preloading to cache")
log.Infof("<%s> exists, preloading to cache", dbpath)
CacheDB.SyncFromDisk(dbpath)
//CacheDB.Print()
} else {
@ -580,7 +580,6 @@ func initDB() {
func initLocalDB(db *DB, dbpath string) {
log.Infof("Initializing local db at '%s'", dbpath)
log.Debugf("%s flushing to disk", db.Name)
err := db.SyncToDisk(dbpath)
if err != nil {
log.Critical(err)

2
log.go
View File

@ -32,7 +32,7 @@ func initLogging() {
logging.SetBackend(leveledBackend)
}
log.Debugf("running in %s mode", RunMode())
log.Warningf("running in %s mode", RunMode())
}
func IsDebugging() bool {