mirror of
https://github.com/cwinfo/yggdrasil-map
synced 2024-11-22 07:00:28 +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:
|
try:
|
||||||
nodes, edges = get_network_from_cjdns(conf.rpc_connect, port, conf.rpc_pw)
|
nodes, edges = get_network_from_cjdns(conf.rpc_connect, port, conf.rpc_pw)
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
print 'Fail!'
|
print 'Fail! Node unresponsive!'
|
||||||
print traceback.format_exc()
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
print '%d nodes, %d edges' % (len(nodes), len(edges))
|
print '%d nodes, %d edges' % (len(nodes), len(edges))
|
||||||
|
@ -23,7 +23,10 @@ do
|
|||||||
sed -i 's/"type": "TUNInterface"/\/\/"type": "TUNInterface"/g' $file
|
sed -i 's/"type": "TUNInterface"/\/\/"type": "TUNInterface"/g' $file
|
||||||
|
|
||||||
if [[ $* == *-d* ]]; then
|
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
|
else
|
||||||
$cjdns_path/cjdroute < $file
|
$cjdns_path/cjdroute < $file
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user