Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notification #11

Closed
phungleson opened this issue Jul 11, 2013 · 5 comments
Closed

Notification #11

phungleson opened this issue Jul 11, 2013 · 5 comments

Comments

@phungleson
Copy link

Sorry for posting a question here, let me know if you have a group or mailing list.

I have playing with eye for a while but couldn't make email notification work. We already have a :smpt server running so our configuration is very simple.

Eye.config do
  mail domain: 'mailer.xxx.org', host: 'mailer.xxx.org', port: 25, from_mail: 'eye@xxx.com', from_name: 'Eye'
  contact :dev, :mail, 'dev@xxx.com'
end

Eye.application 'app' do
  notify :dev
  process :process do
    notify :dev
  end
end

I cannot see anything from the log? Additionally, when is notify :dev triggered?

Many thanks.

@kostya
Copy link
Owner

kostya commented Jul 11, 2013

Hi, there is notification levels:
https://github.com/kostya/eye/blob/master/lib/eye/process/notify.rb#L3
by default its :warn. may be your case not just happens.

For more logging you also can switch logger to debug (something like this):

Eye.config do
  mail domain: 'mailer.xxx.org', host: 'mailer.xxx.org', port: 25, from_mail: 'eye@xxx.com', from_name: 'Eye'
  contact :dev, :mail, 'dev@xxx.com'
  logger "/tmp/1.log"
  logger_level Logger::DEBUG
end

Eye.application 'app' do
  notify :dev, :info

  process :process do
  end
end

not need to write notify everywhere, because all options by default inherited.

@phungleson
Copy link
Author

Thanks @kostya I also configured similar to your suggestion with level but still cannot get any emails.

I tested by kill -9 process, the process did restart but still no emails triggered, I cannot even see this line in eye log.

https://github.com/kostya/eye/blob/master/lib/eye/notify.rb#L58

Anywhere should I look into?

@kostya
Copy link
Owner

kostya commented Jul 11, 2013

hm hard to say. mail notify works fine for me.
did you use notify :dev, :info?

seems needed to add more debug messages (from https://github.com/kostya/eye/blob/master/lib/eye/process/notify.rb#L10). you can try it with examples/ folder locally.

@kostya
Copy link
Owner

kostya commented Jul 11, 2013

you can also ensure that your config correct
by explain, should include :settings, :contacts, :mail keys, and process should have :notify key
and by eye x -c

@phungleson
Copy link
Author

Thanks @kostya for the logger_level Logger::DEBUG hint, I figured out that my server is not connected to mailer correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants