This commit is contained in:
刘河
2019-02-16 23:18:58 +08:00
parent 3b18d66835
commit 7a8cb3d5b6
14 changed files with 243 additions and 217 deletions

View File

@@ -12,7 +12,7 @@ import (
func GetRunPath() string {
var path string
if path = GetInstallPath(); !FileExists(path) {
return "./"
return GetAppPath()
}
return path
}
@@ -48,7 +48,7 @@ func IsWindows() bool {
func GetLogPath() string {
var path string
if IsWindows() {
path = "./"
path = GetAppPath()
} else {
path = "/tmp"
}
@@ -59,7 +59,7 @@ func GetLogPath() string {
func GetTmpPath() string {
var path string
if IsWindows() {
path = GetRunPath()
path = GetAppPath()
} else {
path = "/tmp"
}

View File

@@ -307,6 +307,7 @@ func (s *Conn) GetHostInfo() (h *file.Host, err error) {
} else {
arr := strings.Split(string(b), common.CONN_DATA_SEQ)
h = new(file.Host)
h.Id = file.GetCsvDb().GetHostId()
h.Host = arr[0]
h.Target = arr[1]
h.HeaderChange = arr[2]

View File

@@ -51,7 +51,6 @@ func (s *Csv) StoreTasksToCsv() {
if task.NoStore {
continue
}
lg.Println(task)
record := []string{
strconv.Itoa(task.Port),
task.Mode,

View File

@@ -26,12 +26,12 @@ func InitLogFile(f string, isStdout bool, logPath string) {
}
func Println(v ...interface{}) {
Log.Println(v ...)
Log.Println(v...)
}
func Fatalln(v ...interface{}) {
Log.SetPrefix("error ")
Log.Fatalln(v ...)
Log.Fatalln(v...)
Log.SetPrefix("")
}
func Fatalf(format string, v ...interface{}) {