Skip to content

Commit

Permalink
fixed location at the end of cconsole.log before start
Browse files Browse the repository at this point in the history
  • Loading branch information
daimor committed Mar 23, 2016
1 parent 484ca7f commit 003a1ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ccontainermain.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ func getInstanceFolder(inst string) string {
// shows all new lines in cconsole.log
func tailCConsoleLog(inst string) {
folder := getInstanceFolder(inst)
if t, err := tail.TailFile(folder + "/mgr/cconsole.log", tail.Config{Follow: true}); err != nil {
endLocation := tail.SeekInfo{Offset: 0, Whence: os.SEEK_END}
if t, err := tail.TailFile(folder+"/mgr/cconsole.log", tail.Config{Follow: true, Location: &endLocation}); err != nil {
log.Printf("Error while getting content for cconsole.log\n")
log.Printf("ERR: %s.\n", err)
} else {
Expand Down
Binary file modified distrib/linux/ccontainermain
Binary file not shown.

0 comments on commit 003a1ee

Please sign in to comment.