Skip to content

Commit b839b17

Browse files
author
Sven SAULEAU
authored
Merge pull request #39 from ByteArena/fix-remove-dump-raw-com
refactor: remove dump-raw-comm
2 parents 6b6a130 + 95d57c4 commit b839b17

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

cmd/ba/main.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ func makeapp() *cli.App {
9393
cli.BoolFlag{Name: "debug", Usage: "Enable debug logging"},
9494
cli.BoolFlag{Name: "quiet", Usage: "Decrease verbosity of the output"},
9595
cli.BoolFlag{Name: "profile", Usage: "Enable execution profiling"},
96-
cli.BoolFlag{Name: "dump-raw-comm", Usage: "Dump all the communication between the agent and the server"},
9796
cli.IntFlag{Name: "duration", Usage: "If set, game will stop after this durarion (in seconds)"},
9897
},
9998
Action: func(c *cli.Context) error {
@@ -110,7 +109,6 @@ func makeapp() *cli.App {
110109
IsDebug: c.Bool("debug"),
111110
IsQuiet: c.Bool("quiet"),
112111
ShouldProfile: c.Bool("profile"),
113-
DumpRaw: c.Bool("dump-raw-comm"),
114112
DurationSeconds: c.Int("duration"),
115113
}
116114

glide.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

subcommand/train/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ type TrainActionArguments struct {
6363
IsQuiet bool
6464
MapName string
6565
ShouldProfile bool
66-
DumpRaw bool
6766
DurationSeconds int
6867
}
6968

@@ -136,6 +135,7 @@ func TrainAction(args TrainActionArguments) (bool, error) {
136135
arenaServerUUID,
137136
brokerclient,
138137
gameDuration,
138+
args.IsDebug,
139139
)
140140

141141
for _, dockerImageName := range args.Agentimages {
@@ -184,8 +184,8 @@ func TrainAction(args TrainActionArguments) (bool, error) {
184184
fmt.Printf(HeadsUpColor("[headsup] %s\n"), t.Value)
185185

186186
case arenaserver.EventRawComm:
187-
if args.DumpRaw {
188-
fmt.Printf(AgentColor("[agent] %s\n"), t.Value)
187+
if args.IsDebug {
188+
fmt.Printf(DebugColor("[debug from: %s] %s\n"), t.From, t.Value)
189189
}
190190

191191
case arenaserver.EventClose:

0 commit comments

Comments
 (0)