Is there a method to implement debug log with microsecond precise in haproxy?

I tried to get debug log but time stamp doesnot seem to sync with different log mechanism (syslog). Is there a method to get log with human readable time [hh:mm:ss] and date???]

Anybody has idea??? Is there a method???

I’m not sure what you are asking.

Do you want microsecond precision in haproxy logs?
or
Do you want to troubleshoot your sync issue between syslog time and haproxy time?
or
Do you want troubleshoot human readable time/date issue?

In every case, please share your complete configuration, the output of haproxy -vv, a complete actual log line from your syslog and what you would expect exactly this log line to look like.

I want a debug log…says ./haproxy -f /etc/haproxy/haproxy.cfg -d gives debug log if we enable debug log in makefile. but this log doesnot provides timestamp in hh:mm:ss format. so there is a way to enable this log with human readable time stamp???

No. The reason is that debug mode is used only while troubleshooting very complicated issues, only for very short periods of time and mostly in isolated environments. Debug mode is absolutely not suitable for haproxy instances running production workloads.

Very often troubleshooting doesn’t require debug mode though, but strace output instead, and we usually suggest running “strace -tt” which includes the timestamp of syscalls in microsecond resolution.

Haproxy logging on the other hand contains the time stamp in a human readable format in millisecond resolution I believe.

Is there a way to check function level interaction. Because, syslog gives very less number of log as I believe. Strace-tt can give only system level interaction [system call]. I believe debug can give log at function level. So is there any alternate method? Yes, I need to debug somewhat related to parser. There are many values/parameter that do not throw Alert message. It should be rectify, as I think, Hence I need this. Can we make debug log with hh:mm:sss precision? So that we can match it with other log mechanism [syslog/other trace level tool generated log] with timestamp.

No, debug does not log at function level.

I don’t know what you are debugging, but I believe one would do that directly in gdb by settings breakpoints or by adding additional debug traces in the source code.

Anyway I’d suggest we move this discussion to the mailing list, it’s more appropriate than this discourse discussion forum.

You can just send your question to (no need to subscribe):
haproxy@formilux.org