Skip to content
This repository has been archived by the owner on Nov 9, 2018. It is now read-only.

Commit

Permalink
🐒 fix tail log
Browse files Browse the repository at this point in the history
  • Loading branch information
hellokaton committed Oct 26, 2017
1 parent c7b2540 commit 1e20a40
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Binary file modified bin/linux_amd64/tale-cli
Binary file not shown.
6 changes: 3 additions & 3 deletions tale-cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func main() {
app.Usage = "tale的命令行帮助程序"
app.Author = "https://github.com/biezhi"
app.Email = "[email protected]"
app.Version = "0.0.4"
app.Version = "0.0.5"

app.Commands = []cli.Command{
{
Expand Down Expand Up @@ -81,7 +81,7 @@ func doStart(ctx *cli.Context) {
fmt.Println("Tale 已经启动.")
} else {
// `nohup java -Xms128m -Xmx128m -Dfile.encoding=UTF-8 -jar tale-1.3.0-alpha1.jar >tale.log &`
cmd := exec.Command("/bin/sh", "-c", `nohup java -Xms128m -Xmx128m -Dfile.encoding=UTF-8 -jar `+jarFileName+` >tale.log &`)
cmd := exec.Command("/bin/sh", "-c", `nohup java -Xms128m -Xmx128m -Dfile.encoding=UTF-8 -jar `+jarFileName+` >/dev/null &`)
cmd.Dir = "."
// 重定向标准输出到文件
stdout, err := os.OpenFile("tale.log", os.O_CREATE|os.O_WRONLY, 0600)
Expand Down Expand Up @@ -114,7 +114,7 @@ func doStop(ctx *cli.Context) {

// tail -f tale.log
func tailLog() {
cmd := exec.Command("tail", "-f", "tale.log")
cmd := exec.Command("tail", "-f", "logs/tale.log")
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
err := cmd.Run()
Expand Down

0 comments on commit 1e20a40

Please sign in to comment.