mirror of
https://github.com/cwinfo/yggdrasil-map
synced 2024-11-22 00:00:27 +00:00
Better logging behaviour with gdb
This commit is contained in:
parent
1ed805a7e6
commit
0b639af7d6
@ -96,8 +96,7 @@ def get_full_network():
|
||||
try:
|
||||
nodes, edges = get_network_from_cjdns(conf.rpc_connect, port, conf.rpc_pw)
|
||||
except Exception as ex:
|
||||
print 'Fail!'
|
||||
print traceback.format_exc()
|
||||
print 'Fail! Node unresponsive!'
|
||||
continue
|
||||
|
||||
print '%d nodes, %d edges' % (len(nodes), len(edges))
|
||||
|
@ -23,7 +23,10 @@ do
|
||||
sed -i 's/"type": "TUNInterface"/\/\/"type": "TUNInterface"/g' $file
|
||||
|
||||
if [[ $* == *-d* ]]; then
|
||||
gdb $cjdns_path/cjdroute -ex 'set follow-fork-mode child' -ex 'run < '"${file}" -ex 'thread apply all bt' -ex 'quit' 2>&1 | tee gdb-$i.log &
|
||||
# Log to stdout
|
||||
sed -i 's/\/\/ "logTo":"stdout"/"logTo":"stdout"/g' $file
|
||||
|
||||
gdb $cjdns_path/cjdroute -ex 'set follow-fork-mode child' -ex 'run < '"${file}" -ex 'thread apply all bt' -ex 'quit' > gdb-$i.log 2>&1 &
|
||||
else
|
||||
$cjdns_path/cjdroute < $file
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user