We now get a total order for log messages that makes sense and also the possiblity of measuring the time between any log messages precisely. This can be used to provide latency logs for the spreader or any other critical part of the system.
12 lines
181 B
Bash
12 lines
181 B
Bash
#!/bin/bash
|
|
sed 's/[ \t]*|/|/g' .bts/data/logging/log >clean
|
|
rm log_db
|
|
sqlite3 log_db <<EOF
|
|
create table log(ts,ss,level,tid,tname,pid,loc,msg);
|
|
.separator |
|
|
.import $1 log
|
|
EOF
|
|
|
|
|
|
|