mirror of
https://github.com/optim-enterprises-bv/databunker.git
synced 2025-11-03 11:27:47 +00:00
review log messages
This commit is contained in:
@@ -77,7 +77,7 @@ func (dbobj *SQLiteDB) OpenDB(filepath *string) error {
|
|||||||
if len(dbfile) >= 3 && dbfile[len(dbfile)-3:] != ".db" {
|
if len(dbfile) >= 3 && dbfile[len(dbfile)-3:] != ".db" {
|
||||||
dbfile = dbfile + ".db"
|
dbfile = dbfile + ".db"
|
||||||
}
|
}
|
||||||
log.Printf("Databunker db file is: %s\n", dbfile)
|
log.Printf("Database file: %s\n", dbfile)
|
||||||
// collect list of all tables
|
// collect list of all tables
|
||||||
/*
|
/*
|
||||||
if _, err := os.Stat(dbfile); !os.IsNotExist(err) {
|
if _, err := os.Stat(dbfile); !os.IsNotExist(err) {
|
||||||
@@ -124,7 +124,7 @@ func (dbobj *SQLiteDB) OpenDB(filepath *string) error {
|
|||||||
knownApps = append(knownApps, t)
|
knownApps = append(knownApps, t)
|
||||||
}
|
}
|
||||||
tx.Commit()
|
tx.Commit()
|
||||||
log.Printf("List of tables: %s\n", knownApps)
|
log.Printf("Found tables: %s\n", knownApps)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -139,7 +139,7 @@ func (dbobj *SQLiteDB) InitDB(filepath *string) error {
|
|||||||
if len(dbfile) >= 3 && dbfile[len(dbfile)-3:] != ".db" {
|
if len(dbfile) >= 3 && dbfile[len(dbfile)-3:] != ".db" {
|
||||||
dbfile = dbfile + ".db"
|
dbfile = dbfile + ".db"
|
||||||
}
|
}
|
||||||
log.Printf("Init Databunker db file is: %s\n", dbfile)
|
log.Printf("Create database file: %s\n", dbfile)
|
||||||
db, err := sql.Open("sqlite", "file:"+dbfile+"?_journal_mode=WAL")
|
db, err := sql.Open("sqlite", "file:"+dbfile+"?_journal_mode=WAL")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|||||||
Reference in New Issue
Block a user