mirror of
https://github.com/jixishi/SerialTerminalForWindowsTerminal.git
synced 2026-06-16 00:52:44 +00:00
时间戳 文件传输 支持
This commit is contained in:
@@ -3,6 +3,7 @@ package main
|
||||
import (
|
||||
"log"
|
||||
"net"
|
||||
"os"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
@@ -18,6 +19,8 @@ type Config struct {
|
||||
logFilePath string
|
||||
forWard int
|
||||
frameSize int
|
||||
timesTamp bool
|
||||
timesFmt string
|
||||
address string
|
||||
}
|
||||
type FoeWardMode int
|
||||
@@ -49,3 +52,13 @@ func setForWardClient() (conn net.Conn) {
|
||||
}
|
||||
return conn
|
||||
}
|
||||
|
||||
func checkLogOpen() {
|
||||
if config.enableLog {
|
||||
f, err := os.OpenFile(config.logFilePath, os.O_RDWR|os.O_APPEND|os.O_CREATE, 0666)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
outs = append(outs, f)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user