On Thu, Nov 7, 2024 at 9:52 PM David Marchand <david.march...@redhat.com> wrote:
>
> Improvements and unification of logging library.
> This version works on all platforms: Linux, Windows and FreeBSD.
>
> This is update to rework patch set. It adds several new features
> to the console log output.
>
>   * Putting a timestamp on console output which is useful for
>     analyzing performance of startup codes. Timestamp is optional
>     and must be enabled on command line.
>
>   * Displaying console output with colors.
>     It uses the standard conventions used by many other Linux commands
>     for colorized display.  The default is to enable color if the
>     console output is going to a terminal. But it can be always
>     on or disabled by command line flag. This default was chosen
>     based on what dmesg(1) command does.
>
>     Color is used by many tools (vi, iproute2, git) because it is helpful;
>     DPDK drivers and libraries print lots of not very useful messages.
>     And having error messages highlighted in bold face helps.
>     This might also get users to pay more attention to error messages.
>     Many bug reports have earlier messages that are lost because
>     there are so many info messages.
>
>   * Add support for automatic detection of systemd journal
>     protocol. If running as systemd service will get enhanced
>     logging.
>
>   * Use of syslog is optional and the meaning of the
>     --syslog flag has changed. The default is *not* to use
>     unless requested.
>
> Add Stephen as maintainer for log because by now have added
> more than previous authors.
>
>
> Resending for CI after some small/cosmetic changes:
>
> Changes since v30:
> - added a little helper that identifies log options (this fixed a little
>   bug with the color option being parsed twice) and
>   renamed eal_log_level_parse() as eal_parse_log_options(),
> - adjusted log level to ALERT for EAL error on Windows,
> - split RN updates in relevant patches and fixed style,
> - fixed --syslog usage string,
> - split and squashed Windows shim update in relevant patches,
> - fixed typos,
> - cleaned duplicate inclusion of headers,
> - moved syslog facility code update in relevant patch,
> - removed dead reference to eal_log_set_default,

The escape character \e is refused with MSVC.

This had been reported as a warning starting v26 iiuc:

==== 20 line log output for Windows Server 2022 (dpdk_msvc_compile): ====
...
  [ 3 5 / 9 6 ]   C o m p i l i n g   C   o b j e c t   l i b / l i b
r t e _ l o g . a . p / l o g _ l o g _ c o l o r . c . o b j
  F A I L E D :   l i b / l i b r t e _ l o g . a . p / l o g _ l o g
_ c o l o r . c . o b j
  " c l "   " - I l i b \ l i b r t e _ l o g . a . p "   " - I l i b
"   " - I . . \ l i b "   " - I . "   " - I . . "   " - I c o n f i g
"   " - I . . \ c o n f i g "   " - I l i b \ e a l \ i n c l u d e "
 " - I . . \ l i b \ e a l \ i n c l u d e "   " - I l i b \ e a l \ w
i n d o w s \ i n c l u d e "   " - I . . \ l i b \ e a l \ w i n d o
w s \ i n c l u d e "   " - I l i b \ e a l \ x 8 6 \ i n c l u d e "
 " - I . . \ l i b \ e a l \ x 8 6 \ i n c l u d e "   " - I l i b \ l
o g "   " - I . . \ l i b \ l o g "   " - I C : \ P r o g r a m   F i
l e s \ M e l l a n o x \ M L N X _ W i n O F 2 _ D e v X _ S D K \ i
n c "   " / M D "   " / n o l o g o "   " / s h o w I n c l u d e s "
 " / W 3 "   " / W X "   " / s t d : c 1 1 "   " / O 2 "   " / G w "
" / w d 4 2 4 4 "   " / w d 4 2 6 7 "   " / w d 4 1 4 6 "   " / e x p
e r i m e n t a l : c 1 1 a t o m i c s "   " / d 1 e x p e r i m e n
t a l : t y p e o f "   " / e x p e r i m e n t a l : s t a t e m e n
t E x p r e s
  s i o n s "   " / F I "   " r t e _ c o n f i g . h "   " - D _ G N
U _ S O U R C E "   " - D _ W I N 3 2 _ W I N N T = 0 x 0 A 0 0 "   "
- D A L L O W _ E X P E R I M E N T A L _ A P I "   " - D A L L O W _
I N T E R N A L _ A P I "   " - D R T E _ L O G _ D E F A U L T _ L O
G T Y P E = l i b . l o g "   " / F d l i b \ l i b r t e _ l o g . a
. p \ l o g _ l o g _ c o l o r . c . p d b "   / F o l i b / l i b r
t e _ l o g . a . p / l o g _ l o g _ c o l o r . c . o b j   " / c "
 . . / l i b / l o g / l o g _ c o l o r . c
  . . / l i b / l o g / l o g _ c o l o r . c ( 8 6 ) :   e r r o r
C 2 2 2 0 :   t h e   f o l l o w i n g   w a r n i n g   i s   t r e
a t e d   a s   a n   e r r o r
  . . / l i b / l o g / l o g _ c o l o r . c ( 8 6 ) :   w a r n i n
g   C 4 1 2 9 :   ' e ' :   u n r e c o g n i z e d   c h a r a c t e
r   e s c a p e   s e q u e n c e
  . . / l i b / l o g / l o g _ c o l o r . c ( 8 6 ) :   w a r n i n
g   C 4 1 2 9 :   ' e ' :   u n r e c o g n i z e d   c h a r a c t e
r   e s c a p e   s e q u e n c e
  . . / l i b / l o g / l o g _ c o l o r . c ( 8 8 ) :   w a r n i n
g   C 4 1 2 9 :   ' e ' :   u n r e c o g n i z e d   c h a r a c t e
r   e s c a p e   s e q u e n c e

Respinning the series with \033 (that was used until v25) and we should be good.


-- 
David Marchand

Reply via email to