DPDK patches and discussions
 help / color / mirror / Atom feed
* Add timestamp to dpdk.log
@ 2022-01-04 19:15 Soumya Muralidhar
  2022-01-05 16:17 ` Stephen Hemminger
  0 siblings, 1 reply; 4+ messages in thread
From: Soumya Muralidhar @ 2022-01-04 19:15 UTC (permalink / raw)
  To: dev

[-- Attachment #1: Type: text/plain, Size: 2737 bytes --]

Hi,

I am looking to add timestamp while logging using rte_openlog_stream<https://grok.gigamon.com:8443/source/s?defs=rte_openlog_stream&project=nfv_master> function where you pass the file pointer as a parameter to this function.
Below is the snippet :


const char *dpdk_log_path<https://grok.gigamon.com:8443/source/s?refs=dpdk_log_path&project=nfv_master> = "/var<https://grok.gigamon.com:8443/source/s?path=/var/&project=nfv_master>/log<https://grok.gigamon.com:8443/source/s?path=/var/log/&project=nfv_master>/dpdk.log<https://grok.gigamon.com:8443/source/s?path=/var/log/dpdk.log&project=nfv_master>"


log_fp<https://grok.gigamon.com:8443/source/xref/nfv_master/src/ehal_lib/ehal_dpdk_binding.c?r=6c10cae5#log_fp> = fopen<https://grok.gigamon.com:8443/source/s?defs=fopen&project=nfv_master>(dpdk_log_path<https://grok.gigamon.com:8443/source/xref/nfv_master/src/ehal_lib/ehal_dpdk_binding.c?r=6c10cae5#dpdk_log_path>, "a+");

    if (log_fp<https://grok.gigamon.com:8443/source/xref/nfv_master/src/ehal_lib/ehal_dpdk_binding.c?r=6c10cae5#log_fp> == NULL<https://grok.gigamon.com:8443/source/s?defs=NULL&project=nfv_master>) {

         EHAL_LOG<https://grok.gigamon.com:8443/source/s?defs=EHAL_LOG&project=nfv_master>(LOG_ERR<https://grok.gigamon.com:8443/source/s?defs=LOG_ERR&project=nfv_master>, "dpdk log file(%s) open failed, error (%d:%s) ",

                  dpdk_log_path<https://grok.gigamon.com:8443/source/xref/nfv_master/src/ehal_lib/ehal_dpdk_binding.c?r=6c10cae5#dpdk_log_path>, errno<https://grok.gigamon.com:8443/source/s?defs=errno&project=nfv_master>, strerror<https://grok.gigamon.com:8443/source/s?defs=strerror&project=nfv_master>(errno<https://grok.gigamon.com:8443/source/s?defs=errno&project=nfv_master>));

         return (errno<https://grok.gigamon.com:8443/source/s?defs=errno&project=nfv_master>);



rte_openlog_stream<https://grok.gigamon.com:8443/source/s?defs=rte_openlog_stream&project=nfv_master>(log_fp<https://grok.gigamon.com:8443/source/xref/nfv_master/src/ehal_lib/ehal_dpdk_binding.c?r=6c10cae5#log_fp>);


Thanks,
Soumya
This message may contain confidential and privileged information. If it has been sent to you in error, please reply to advise the sender of the error and then immediately delete it. If you are not the intended recipient, do not read, copy, disclose or otherwise use this message. The sender disclaims any liability for such unauthorized use. NOTE that all incoming emails sent to Gigamon email accounts will be archived and may be scanned by us and/or by external service providers to detect and prevent threats to our systems, investigate illegal or inappropriate behavior, and/or eliminate unsolicited promotional emails (“spam”).

[-- Attachment #2: Type: text/html, Size: 7532 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-01-06  8:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-04 19:15 Add timestamp to dpdk.log Soumya Muralidhar
2022-01-05 16:17 ` Stephen Hemminger
2022-01-05 17:42   ` Soumya Muralidhar
2022-01-05 17:58     ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).