Doesn't seem to be working at all #1

Open
timuckun opened this Issue Nov 27, 2012 · 5 comments

Projects

None yet

2 participants

@timuckun

I have been using yell for my rake tasks and wanted to integrate it with the rest of the rails app. I put it in the gemfile and ran the generator to create the yml file. I make a slight tweak to the dev environment to test it but it doesn't seem to do anything. It doesn't create a date stamped file and it doesn't create a symlink.

Here is the yml file

# The following is an example config file for yell.

development:
  :level: 'gte.debug'
  adapters:
    - :datefile:
        :filename: 'log/development.log'
        :symlink: true
        :keep:  5

production:
  # set the minimum log level to info
  :level: 'gte.info'

  # define multiple adapters: one for notice and one for error messages
  :adapters:
    # this adapter writes all messages with a log level of warn or lower
    # and writes to production.log
    - :datefile:
        :level: 'lte.warn'
        :filename: 'log/production.log'

    # this adapter writes all messages with a log level of error or higher
    # and writes to error.log
    - :datefile:
        :level: 'gte.error'
        :filename: 'log/production_error.log'


Owner

Hi there,

you need to have all the keys in yout YAML file as symlinks, e.g.

development:
  :level: 'gte.debug'
  :adapters:
    - :datefile:
        :filename: 'log/development.log'
        :symlink: true
        :keep:  5

Notice the :adapters: vs adapters: difference? That should work. I could look into having Yell accept string keys as well... for now only symbols, though.

Best,
Rudi

Owner

Just as an update: I released a new version of yell and yell-rails to enable non-symbol keys. Can you test-drive it and possibly provide feedback?

I tried loading both yell-rails and yell from git and got this error Could not find gem 'yell (~> 1.2.1) ruby', which is required by gem 'yell-rails (>= 0) ruby', in any of the sources.

I removed the git reference in my gemfile for yell rails and kept the git for yell like this

gem 'yell-rails' #, :git => 'git://github.com/rudionrails/yell-rails.git'
gem 'yell' , :git => 'git://github.com/rudionrails/yell.git'
gem "yell-adapters-gelf" #, :git => 'git://github.com/rudionrails/yell-adapters-gelf.git'

And I did get bundle to complete but it didn't work with non symbol keys.

I made everything into symbols and it worked again.

BTW yell is awesome.

Owner

Well... both versions for v1.2.1 are on rubygems... it is true that I have not increased the gelf and syslog versions for yell (which I will shortly). When installing yell-rails, I am able to pull yell v1.2.1 properly... lemme look into this.

Owner

So, I updated the external adapters... could you try all this without the git references again, please? Versions in your Gemfile.lock should be:

  • yell: 1.2.1
  • yell-rails: 1.2.1
  • yell-adapters-gelf: 1.2.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment