similar to: Rails logger: how to access it in a my own class

Displaying 20 results from an estimated 2000 matches similar to: "Rails logger: how to access it in a my own class"

2008 Feb 12
4
Funny behavior with Fixtures... on Ubuntu..
Hey Guys, I''ve got a test class that loads a bunch of fixtures. My understanding is that fixtures are reloaded between each test... and I even have the following two method calls at the top of my test class to make doubly sure... class TaskTest < Test::Unit::TestCase self.use_transactional_fixtures = true self.use_instantiated_fixtures = false When I run my tests
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 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/.
2005 Dec 16
2
Using logger from rails cron jobs
Hi. I''m trying to use logger from a rails cron job. It works fine, but I''d like the standard ruby behavior of stamping each log with date and time. How do I do this? I''m trying: # Set up out logging require ''logger'' logger = Logger.new(STDERR) logger.level = Logger::INFO RAILS_DEFAULT_LOGGER = logger # Tell rails to log to our logger also The
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
2006 Apr 29
11
Multiple actions from one form - possible?
Hello * Obviously the rhtml below does not work, but it should be apparent what I try to achieve - I would like to give the user the choice to submit a form either to action1 or action2 but I cannot figure out how?! It would be great if someone could give some assistance. Thanks a lot, Alex <%= start_form_tag :action1 => ''save'', :action2 =>
2005 Dec 09
7
UserEngine - rake bootstrap aborted
Hi there, I''ve just installed login_engine and user_engine from the repositories, followed the setup procedures as documented in: vendor/plugins/user_engine/README But I''m getting the following failure: vince@vaio:~/Projects/Booking$ rake bootstrap (in /home/vince/Projects/Booking) rake aborted! undefined method `edit'' for class `UserController''
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
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
2015 Mar 15
4
Asterisk 13.1.0/PJSIP outbound calling using SIP trunk: Unable to create request with auth.No auth credentials for any realms in challenge.
Yes, I think the dial does get executed (sonny calling outbound 202-555-1212): core set verbose 3 Console verbose was OFF and is now 3. -- Executing [912025551212 at from-internal:1] Log("PJSIP/sonny-00000031", "NOTICE, Dialing out from "" <sonny> to 12025551212 through fromgw") in new stack [Mar 15 19:27:06] NOTICE[16648][C-00000022]: Ext. 912025551212:1 @
2015 Mar 15
3
Asterisk 13.1.0/PJSIP outbound calling using SIP trunk: Unable to create request with auth.No auth credentials for any realms in challenge.
That was the issue, thanks. I now am able to get the caller ringing on an outbound call, but an external phone number (E164) I am dialing does not ring. On Sun, Mar 15, 2015 at 12:19 PM, George Joseph <george.joseph at fairview5.com > wrote: > > > On Sun, Mar 15, 2015 at 8:32 AM, Sonny Rajagopalan < > sonny.rajagopalan at gmail.com> wrote: > >> I have setup my
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 Jun 12
1
filter/exclude confusion ???
I am running rsync -avz from [A], to pull a directory from [B]. I want to _exclude_ several directories on [B] from being pulled across. Since these directories have short names, I hope that I can either specify them inline rsyncd.conf on [B]; or, inline to the CLI on [A]. I am confused with man rsyncd.conf, where the manpage states: "it only applies on the daemon" I have tried
2012 Jan 24
2
Help: read a proportion of high through-put data
Dear All, I have a text file, tab delimited, called "sample.txt",as follows: ID_REF 382 GC_Score Theta R B_Allele_Freq Log_R_Ratio 200003 BB 0.9101527 0.9734979 0.8788951 1 0 200006 AB 0.6003323 0.4385073 2.033364 0.4850979 0.01553433 I have explored various options of the command: read.table, with one as:
2015 Mar 15
2
Asterisk 13.1.0/PJSIP outbound calling using SIP trunk: Unable to create request with auth.No auth credentials for any realms in challenge.
I have setup my Asterisk 13.1.0 server with PJSIP on AWS/EC2. My basic configuration works, and I am connected to a SIP trunk using SIP.US, and have set up my inbound calling which works correctly (when I call my PBX DID, the call does come into my PBX network). The issue is that I am not able to make outbound calls, because the call fails with the error:
2016 Jan 29
3
Asterisk 13.6.0: Is there a way to create PJSIP users and dialplans programmatically using API
Hi, I am using Asterisk 13.6.0 and was wondering if I can programmatically add users (to pjsip.conf) and dialplan (to extensions.conf) to the Asterisk server using API of some sort. Please do let me know. Thanks, Sonny. -------------- next part -------------- An HTML attachment was scrubbed... URL:
2015 Mar 16
1
Asterisk 13.1.0/PJSIP outbound calling using SIP trunk: Unable to create request with auth.No auth credentials for any realms in challenge.
On Sun, Mar 15, 2015 at 5:56 PM, Sonny Rajagopalan <sonny.rajagopalan at gmail.com> wrote: > George, > > I have the detailed log below. (Resending after trimming the email to 40KB.) > > The sequence below just repeats ad-nauseam. Is this a SIP trunk issue? > > Thanks! > I don't see anything obvious. The registration works though, right? You might want to compare
2015 Nov 17
2
How do I enable instant messaging support for PJSIP endpoints on Asterisk 13.1.0?
Thanks again. How do you create that message context in extensions.conf? On Mon, Nov 16, 2015 at 9:44 PM, Thyda ENG <engthyda at gmail.com> wrote: > According to what I have done , I add the message_context to the > pjsip.endpoint_custom.conf in /etc/asterisk and then I create that > message_context in the extension.conf, and it works. > > On Tue, Nov 17, 2015 at 9:34 AM,
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