History log of /dpdk/doc/guides/prog_guide/log_lib.rst (Results 1 – 5 of 5)
Revision Date Author Comments
# 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 ...


# 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 ...


# 98513036 27-Oct-2024 Stephen Hemminger <stephen@networkplumber.org>

log: rework syslog handling

Refactor how syslog is handled, make it common to Linux and FreeBSD
The syslog facility property is better handled in lib/log
rather than in eal.
This also adds syslog su

log: rework syslog handling

Refactor how syslog is handled, make it common to Linux and FreeBSD
The syslog facility property is better handled in lib/log
rather than in eal.
This also adds syslog support to FreeBSD.

Log to syslog only if option is specified.
If no --syslog is given then use only standard error.

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 ...


# 523bf2d9 27-Feb-2024 David Marchand <david.marchand@redhat.com>

doc: replace code blocks with includes in logging guide

Rather than have a block of code as example that gets unaligned as
time passes, add literal includes.

The coding style guide points at the cf

doc: replace code blocks with includes in logging guide

Rather than have a block of code as example that gets unaligned as
time passes, add literal includes.

The coding style guide points at the cfgfile library, let's use it too
as an example.

Fixes: 97433132c2ed ("lib: use per line logging in helpers")

Signed-off-by: David Marchand <david.marchand@redhat.com>

show more ...


# 09ce4131 09-Aug-2023 Bruce Richardson <bruce.richardson@intel.com>

log: separate logging functions out of EAL

Move the logging capability to a separate library, free from EAL. Rename
files as appropriate, and use meson.build to select the correct file to
be built f

log: separate logging functions out of EAL

Move the logging capability to a separate library, free from EAL. Rename
files as appropriate, and use meson.build to select the correct file to
be built for each operating system, rather than having a subdir per-os.
Add new documentation section in programmers guide to cover logging in
more detail.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>

show more ...