Project

General

Profile

Actions

Feature #5032

closed

Add VTY option to write TID in log line prefix

Added by pespin about 3 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
libosmocore
Target version:
-
Start date:
02/17/2021
Due date:
% Done:

100%

Spec Reference:

Description

Similar to other options to prefix log lines with several information, it would be nice having some generic integrated way to log TID on each line, to ease debug and udnerstanding of multi-threaded processes.

A command under "logging ..." node, something like: "logging print tid (0|1)", which would be disabled by default.

This can easily be implemented now that we have "osmo_gettid()" API (see #5027).

We could even have an internal __thread variable with some osmo_gettid_cached() internal API which would fill the __thread variable if it is == 0, in order to avoid calling gettid() and potentially issuing a syscall everytime.

See as an example:
https://gerrit.osmocom.org/c/libosmocore/+/22952 logging: gsmtap: Store TID instead of PID in pkt hdr


Related issues

Related to libosmocore - Bug #5027: logging_gsmtap.c code not filling PID field in pkt headerResolvedpespin02/16/2021

Actions
Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)