Information: Forum is in read-only mode
For details and other support options see

Logging of debug messages in ommail

This is the place for developers to discuss bugs, new features and everything else about code changes.

Moderator: alorbach

Google Ads

Logging of debug messages in ommail

Postby abeverley » Sun Apr 29, 2012 9:21 pm

For reasons unknown, I've had problems with the ommail connecting to the local mailer. It's taken me a long time to debug, because for some reason the dbgprintf() messages in ommail.c don't seem to go anywhere. In my case, it was the dbgprintf("create tcp connection failed, reason %s"...) error.

My question is: is this a bug? When I run rsyslogd in debug mode, I get lots of messages, but not the above. The only way I managed to debug was by inserting my own errmsg.LogError() lines into the ommail.c code.

Is there any mileage in adding in some errmsg.LogError functions into ommail.c, when it can't connect to the mailer?

Grateful for your thoughts.

Posts: 4
Joined: Sun Jan 15, 2012 12:18 pm

Urgent Question?

  • Pulling out your Hair?
  • Wasting Time and Money?
  • Deadline Approaching?

Re: Logging of debug messages in ommail

Postby rgerhards » Mon Apr 30, 2012 10:32 am

Well, dbgprintf() is a very basic function and it should *always* work. I'Ve actually never seen a case where it does not. Did you possibly not reach the code in question (you could add additional dbgprintfs to make sure you understand the control flow).

Unfortunately, that's the best advise I currently have to offer.

Also thx for the other postings, I'll see that I merge these useful patches soon!

Site Admin
Posts: 3807
Joined: Thu Feb 13, 2003 11:57 am

Google Ads

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 0 guests