similar to: Using logger from rails cron jobs

Displaying 20 results from an estimated 1000 matches similar to: "Using logger from rails cron jobs"

2006 Mar 30
1
Logger::Format not defined (NameError) [NOOB]
I have just installed apache2 / php4 / mysql and RoR on a clean and minimal Ubuntu (5.10) server. I have set up a test site and can reach the "Welcome on board" index page. However when I run "ruby script/generate contoller firsttest" I get the following error. ./script/../config/../vendor/activesupport/lib/active_support/clean_logger.rb:13:in `remove_const'':
2006 Jan 11
1
logger in my classes
Hi, I wrote a class which is not an AR extension, nor a controller. I''d like to use logger.* methods there too. My class is in lib/ dir. I include it in environment.rb with the line require ''lib/localization'' just after the line require File.join(File.dirname(__FILE__), ''boot'') I tried many ways to reuse the logger class. The cleaner way seemed to
2005 Dec 29
2
Access rails logger from plain class
How can I "get" the rails logger from a plain class, that is a class that does not inherit from a rails class? I have tried using RAILS_DEFAULT_LOGGER (see below) but it''s nil class MyClass logger = RAILS_DEFAULT_LOGGER def myMethod logger.debug("stuff...") end end -- Posted via http://www.ruby-forum.com/.
2009 Jul 07
1
[PATCH] Set up ovirt-agent so it starts as a daemon
This sets up ovirt-agent to start as a daemon along with dbomatic, taskomatic etc. While this is not ready for prime time I think it should be ok as you still require a valid, authenticated, connection to qpidd to access it. Signed-off-by: Ian Main <imain at redhat.com> --- installer/modules/ovirt/manifests/ovirt.pp | 6 +++ ovirt-server.spec.in | 5 ++
2005 Oct 27
1
Logger datetime_format not working ?
I''m trying to configure logger in a rails app. I added this to my environment.rb : RAILS_DEFAULT_LOGGER.datetime_format = "%Y-%m-%d %H.%M.%s" Yet, none of the entries in the development.log show the datestamp. What can you tell me about this ? Thanks. Peter Fitzgibbons _______________________________________________ Rails mailing list
2005 Dec 09
0
Default Logger -> Database log
Hi listers, I''m trying to save my log entries in the database using the following technique : http://wiki.rubyonrails.com/rails/pages/DatabaseLoggerWish I''ve added the following code to the Environment.rb : ---------------------------------------------------------------------------- begin RAILS_DEFAULT_LOGGER = DBErrorLogger.new() rescue StandardError
2006 Apr 04
2
Default logger inside arbitrary classes
Hi, What''s the best way to get the default logger (the one used during the tests) from inside a class that doesn''t inherit any rails class? Thanks Oscar --------------------------------- Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1&cent;/min. -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 Nov 10
0
Override logger for large binary data
I''ve searched high and low and played around and couldn''t figure out how to override what the logger prints for a specific model (one that has many columns of multi-100K blobs). I ''tail -f log/development.log'' in a shell within emacs and it really doesn''t like the huge lines dumped out during saves/updates. So, I finally figured out that if I put the
2006 Jun 20
0
Quiet the Logger in 1.1
I''m using Rails 1.1 and I''m trying to quiet the logger. I searched the mailing list and placed the following inside my environment.rb: RAILS_DEFAULT_LOGGER.level = (RAILS_ENV == ''production'' ? Logger::INFO : Logger::DEBUG) But I keep getting: /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123:in `const_missing'':
2006 Jan 12
3
How to Selectively Quite SQL Logging
I know about logger.silence but here is the issue: I''m comfortable with the way the user engine is working, but it generates quite a bit of SQL noise in the logs. I''d like, for that engine, to suppress the SQL logging. Code in it has return statements in conditionals, e.g., if !user? RAILS_DEFAULT_LOGGER.debug "checking guest authorisation for
2006 Aug 06
2
Rails logger: how to access it in a my own class
Hey Guys, The only way I could find to access the Rails logger object was to subclass from ApplicationController... can anyone suggest a more sensible way of doing it? Soroe. -- Posted via http://www.ruby-forum.com/.
2006 May 03
6
ActiveRecord and Lost Connection
This isnt totally a rails question; I am using ActiveRecord for storing some simple values into a database. My problem; I keep gettign MySQL Errors. On the Win32 machine it was off and on. Now on the linux machine (ubuntu) I can'' t connect at all. I have all the password settings correct. My only thought, I am working with Threads and thought that might cause the issue, but I
2006 Nov 22
4
Error when starting bgrdb
Hi, I get this error when starting bgdrb using "rake backgroundrb:start" (on a Mac using bgdrb 0.2.0): /Users/gl/Projects/xxxxx/xxxxx/vendor/plugins/backgroundrb/server/lib/ backgroundrb_server.rb:33:in `format_message'': undefined method `strftime'' for "2006-11-22T12:34:18.524572 ":String (NoMethodError) from /usr/lib/ruby/1.8/logger.rb:320:in
2006 May 17
1
ActiveRecord vs logger
Appendix B.1 of the Agile book says you can configure as follows: B.1 Active Record Configuration ActiveRecord::Base.logger =logger Accepts a logger object. This is used internally to record database activity. It is also available to applications that want to log activity. Yet, as far as I know, there is no way to use logger.info and friends within a model. Is there? Or is this simply
2008 Mar 12
3
a way to restrict who can install your app, for private testing
This is something I just cooked up to allow me to restrict temporarily who can access my app, based on an array of UIDs. It''s messy but works. Put at the top of your controller, at the end of your filters. # This filter is only until we open everything up before_filter do |c| acceptable_uids = [''594180515'', ''122612996''] unless
2006 Jul 10
7
How to obscure/encrypt password parameter?
Hi all- I am building an application that includes a login screen. During development I found that user passwords are logged by Rails in plain text -- this will not be acceptable to my users. Is there a way to obscure/encrypt incoming password parameters or not write them to the log files at all? One thought was to use Javascript, but I was not sure how secure that would be. Thanks, Josh
2007 Apr 01
8
No stacktrace on errors (edge rails)
Hi, I must be missing something or have something misconfigured, but I get no stack-trace when there is an error in the code behind a view. If the view doesn''t compile, then I see an error & stacktrace, but all other errors I get a "lost network connection" from the browser, and nothing at all in the server output or development.log. It''s been that way with
2006 Jan 06
10
I need debugging tips?
Hi all, Like most other frameworks, Ruby groups code by Model/View/Controller instead of by task, and therefore I''m having a hard time debugging a problem from the Agile Rails book where looping through @items errors out because one or more items is nil. I managed to empty the cart by placing session[:cart] = nil in find_cart() in the store_controller_rb, and the problem continued
2008 Mar 06
5
Setting :canvas => false for URL generation doesn''t always work?
I generate a lot of URL''s in my Facebook related code that point to our main site, not our FB app. My understanding was that the way to do this was to use ":canvas => false" as a parameter to url_for and link_to and so on. However, that doesn''t seem to generate the proper URL''s. The URL''s still point to apps.facebook.com (because they
2006 Apr 11
2
using log4r and rails
hey everyone. i know somebody else had started a thread on this subject, but since no one seems to be answering that thread i thought i would start one of my one. i''m doing a project for a client and we need some seriously verbose logging. it looks like log4r can do what i need, but i can''t for the life of me figure out how to plug it into rails. everywhere talks about how