diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2024-08-28 17:08:45 +0300 |
|---|---|---|
| committer | Donatas Abraitis <donatas@opensourcerouting.org> | 2024-08-28 17:08:45 +0300 |
| commit | a0a2a35ed30938f99715cced352a3fd6f89d82dd (patch) | |
| tree | a0da346fcc2cfc348bd36ce2c5a1b558bf80982d /staticd/static_debug.c | |
| parent | b1012b693fcfed29a05d99e8bea623902223dc7b (diff) | |
lib: Add a helper function to dump Lua stack
Very handy for debugging.
In Lua script just use "log.trace(table)":
```
function on_rib_process_dplane_results(ctx)
log.trace(ctx.rinfo.zd_ng)
end
```
You will get something like:
```
Aug 28 17:04:36 donatas-laptop zebra[3782199]: [GCZ7N-MM9D9] {
1: {
type: 2
weight: 1
flags: 5
backup_idx: 0
vrf_id: 0
nh_encap_type: 0
gate: {
value: 5.87967e+08
string: "192.168.11.35"
}
nh_label_type: 0
srte_color: 0
ifindex: 0
backup_num: 0
}
2: {
type: 3
weight: 1
flags: 3
backup_idx: 0
vrf_id: 0
nh_encap_type: 0
nh_label_type: 0
srte_color: 0
ifindex: 4
backup_num: 0
}
}
```
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'staticd/static_debug.c')
0 files changed, 0 insertions, 0 deletions
