| 259f6f78 | 27-Oct-2024 |
Stephen Hemminger <stephen@networkplumber.org> |
log: colorize log output
Like dmesg, colorize the log output (unless redirected to file). Timestamp is green, the subsystem is in yellow and the message is red if urgent, boldface if an error, and n
log: colorize log output
Like dmesg, colorize the log output (unless redirected to file). Timestamp is green, the subsystem is in yellow and the message is red if urgent, boldface if an error, and normal for info and debug messages.
The default is to not use color since it may disturb automatic tests and other embedded usage.
Note: add fileno() and isatty() to the Windows wrapper.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Chengwen Feng <fengchengwen@huawei.com>
show more ...
|
| 9da0dc6c | 27-Oct-2024 |
Stephen Hemminger <stephen@networkplumber.org> |
log: support systemd journal
If DPDK application is being run as a systemd service, then it can use the journal protocol which allows putting more information in the log such as priority and other i
log: support systemd journal
If DPDK application is being run as a systemd service, then it can use the journal protocol which allows putting more information in the log such as priority and other information.
The use of journal protocol is automatically detected and handled. Rather than having a dependency on libsystemd, just use the protocol directly as defined in: https://systemd.io/JOURNAL_NATIVE_PROTOCOL/
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
show more ...
|
| 62ae1149 | 27-Oct-2024 |
Stephen Hemminger <stephen@networkplumber.org> |
log: add timestamp option
When debugging driver or startup issues, it is useful to have a timestamp on each message printed. The messages in syslog already have a timestamp, but often syslog is not
log: add timestamp option
When debugging driver or startup issues, it is useful to have a timestamp on each message printed. The messages in syslog already have a timestamp, but often syslog is not available during testing.
There are multiple timestamp formats similar to Linux dmesg. The default is time relative since startup (when first step of logging initialization is done by constructor). Other alternative formats are delta, ctime, reltime and iso formats.
Example: $ dpdk-testpmd --log-timestamp -- -i [ 0.008610] EAL: Detected CPU lcores: 8 [ 0.008634] EAL: Detected NUMA nodes: 1 [ 0.008792] EAL: Detected static linkage of DPDK [ 0.010620] EAL: Multi-process socket /var/run/dpdk/rte/mp_socket [ 0.012618] EAL: Selected IOVA mode 'VA' [ 0.016675] testpmd: No probed ethernet devices Interactive-mode selected
Note: Windows does not have localtime_r but it does have a similar function that can be used instead. Add it to rte_os_shim.h.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
show more ...
|