Hi,
I want to send logs to email. I am using log4r for this, but something
doesn''t work. My system is ubuntu gutsy gibbon.
I have created logger in like this:
email_all_outputter = Log4r::EmailOutputter.new ''mail_all'',
:server=>''localhost'',
:port=>25,
:domain=>''herodot'',
:from=>''amorfis@herodot'',
:to=>''xxxxxxxxx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org'',
:subject=>''Log Report'',
:immediate_at => ''ALL''
email_all_outputter.formatter = pattern_formatter
email_logger = Log4r::Logger.new "mail"
email_logger.add email_all_outputter
Then I try to simply send mail:
mail_logger = Log4r::Logger[''mail'']
mail_logger.info "Search"
But this mail never gets to my inbox. In /var/log/mail.log I find this:
Nov 1 21:29:15 herodot postfix/smtpd[11545]: connect from
localhost[127.0.0.1]
Nov 1 21:29:15 herodot postfix/smtpd[11545]: lost connection after EHLO
from localhost[127.0.0.1]
Nov 1 21:29:15 herodot postfix/smtpd[11545]: disconnect from
localhost[127.0.0.1]
I don''t know what is wrong. I can send email by "sendmail -t
xxxxxxxxx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" without any problems.
From address is the same. Why
mail from log4r can''t get through?
Regards
Paweł Stawicki
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---