Skip to content

Commit

Permalink
topotests: log exabgp by default
Browse files Browse the repository at this point in the history
Log exabgp by default in /tmp/topotests/<testname>/<peername>/exabgp.log
Level is DEBUG.

Signed-off-by: Louis Scalbert <[email protected]>
  • Loading branch information
louis-6wind committed Jun 14, 2023
1 parent 22c329e commit 3f777fd
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/topotests/lib/topogen.py
Original file line number Diff line number Diff line change
Expand Up @@ -1192,7 +1192,17 @@ def start(self, peer_dir, env_file=None):
self.run("chmod a+x /etc/exabgp/*.py")
self.run("chown -R exabgp:exabgp /etc/exabgp")

output = self.run(exacmd + " -e /etc/exabgp/exabgp.env /etc/exabgp/exabgp.cfg")
log_dir = os.path.join(self.logdir, self.name)
self.run("chmod 777 {}".format(log_dir))

log_file = os.path.join(log_dir, "exabgp.log")

env_cmd = "env exabgp.log.level=DEBUG "
env_cmd += "exabgp.log.destination={} ".format(log_file)

output = self.run(
env_cmd + exacmd + " -e /etc/exabgp/exabgp.env /etc/exabgp/exabgp.cfg "
)
if output is None or len(output) == 0:
output = "<none>"

Expand Down

0 comments on commit 3f777fd

Please sign in to comment.