Skip to content

Commit

Permalink
add more log
Browse files Browse the repository at this point in the history
  • Loading branch information
martianzhang committed Jan 10, 2019
1 parent 9ae6752 commit faaa59f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions cmd/soar/tool.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ func initQuery(query string) string {
if err != nil {
common.Log.Critical("ioutil.ReadAll Error: %v", err)
}
common.Log.Debug("initQuery get query from os.Stdin")
return string(data)
}

Expand All @@ -219,6 +220,7 @@ func initQuery(query string) string {
if err != nil {
common.Log.Critical("ioutil.ReadFile Error: %v", err)
}
common.Log.Debug("initQuery get query from file: %s", query)
return string(data)
}

Expand Down
2 changes: 1 addition & 1 deletion common/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ func parseDSN(odbc string, d *Dsn) *Dsn {
func ParseDSN(odbc string, d *Dsn) *Dsn {
cfg, err := mysql.ParseDSN(odbc)
if err != nil {
Log.Warn("go-sql-driver/mysql.ParseDSN Error: %s, DSN: %s, try to use old version parseDSN", err.Error(), odbc)
Log.Debug("go-sql-driver/mysql.ParseDSN Error: %s, DSN: %s, try to use old version parseDSN", err.Error(), odbc)
return parseDSN(odbc, d)
}
return newDSN(cfg)
Expand Down

0 comments on commit faaa59f

Please sign in to comment.