aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/log.c
AgeCommit message (Collapse)AuthorFilesLines
2018-10-03fix format error in show logging config outputJerome Tollet1-3/+6
Change-Id: Idc41a219db185b524f497b096eb71892b5f9ebf8 Signed-off-by: Jerome Tollet <jtollet@cisco.com>
2018-09-27"show log": print wall-clock timeDave Barach1-1/+14
Change-Id: I36f42c03f778955dd543da6c878be090d0443922 Signed-off-by: Dave Barach <dave@barachs.net>
2018-08-25Add int cast to fit '.*' printf expectationsPierre Pfister1-4/+5
Sometimes, compiler would throw an error: error: field precision specifier ‘.*’ expects argument of type ‘int’, but argument 5 has type ‘u64 {aka long unsigned int}’ This change adds the requested cast. Change-Id: I43edeac0ee565a1fcee38b9d2942e49c8dd63116 Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2018-05-19log: Validate the size of vec in vlib_logMohsin Kazmi1-0/+1
Change-Id: I6d1218c17ee055275596b9a49767f15994aa1b2b Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-04-26vlib: set log tap level <level> does not work for some keywordsSteven1-2/+2
While some levels such as debug and emerg work, others don't. See below. DBGvpp# set log class tap level warn set log class tap level warn set logging class: unknown input `level warn' DBGvpp# set log class tap level debug set log class tap level debug DBGvpp# set log class tap level info set log class tap level info set logging class: unknown input `level info' DBGvpp# set log class tap level err set log class tap level err DBGvpp# set log class tap level crit set log class tap level crit set logging class: unknown input `level crit' DBGvpp# set log class tap level emerg set log class tap level emerg DBGvpp# Cause: The reason for the failure for the shorter keywords is level_str is unformatted with %v which is not null terminated. For example, the character after "info" could be anything in level_str. The memcmp with size of the macro keyword __##uc which includes the null character or 5 in this case and thus the comparison fails. Fix: Use %s which insure level_str is null terminated. Use strcmp to rule out false positve match like "debugxxx" against keyword "debug". Change-Id: I7a2d97a0f7f618df105da7eca791618dce04d21e Signed-off-by: Steven <sluong@cisco.com>
2018-04-18vlib: logging improvementsDamjan Marion1-31/+72
Change-Id: I1c72d9ddefdc83c7d5ab2564f89d83ffd3fa6110 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-04-17Add logging supportDamjan Marion1-0/+673
Change-Id: Ieac9cf50156dbbb4962411e900d59256441915ef Signed-off-by: Damjan Marion <damarion@cisco.com> Signed-off-by: Klement Sekera <ksekera@cisco.com>