Displaying 20 results from an estimated 600 matches similar to: "logger in my classes"
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 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 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 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¢/min.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
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 Jan 13
1
How to disconnect to a database????
Hi,
We have experienced some problems with
ActiveRecord::Base class of Ruby-Rails. We are
building a web-application based on the Ruby-rails
framework and the web-application needs to access to
difference databases, so we do not pre-define our
database accesses in the database.yml file. In fact,
we are using the
ActiveRecord::Base.establish_connection() to connect
to our database, the function
2008 Jul 08
6
Show SQL request without issuing it
Hi all,
I saw that some object.save is causing the SQL request to crash, but I
don''t see the SQL request in the logs (only ruby code that''s showing an
error during the .save method).
Is there any way to show the SQL request before it''s issued to the
database ?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received
2008 Mar 24
4
Doesnt show log on command prompt
I have latest version of mongrel installed.
But when I run ''ruby script/server'' it starts the server and shows
nothing else, like development log it used to show on my previous dev
machine.
Any idea?
--
Posted via http://www.ruby-forum.com/.
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
2009 Feb 10
2
Dovecot 1.1.11 segfaults on auth configuration error
Hi,
i have compiled & packaged Dovecot 1.1.11 on Solaris 8 x86 with Sun
Studio 11 and installed the result on Solaris 10 x86 zone.
When i now configure auth mechanisms other than "login" or "plain" while
only providing pam as the passdb, Dovecot segfaults on startup. I know
that my configuration is wrong here, but i guess this still qualifies
as a bug. Remedy would be
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
2019 Jun 21
3
Samba winbind on centos 7 - "domain users" acls added
hello,
My 2nd issue is about acls which are added by "Domain users".
May you help me to solve it again ?
Concerning this issue, on my samba share, I set permissions for the
share "groups" located on /var/datashared for "domain admins" (rwx) and
"domain users" (r-x)
/var]# getfacl datashared/
# file: datashared/
# owner: root
# group: root
user::rwx
2006 Jan 05
7
HOWTO: Combine fields from 2 two tables in 1 object
Hi all,
For a dropdownlist (showing "Company - FirstName Lastname'') I want to fill an
object @project_contacts with "Name" from table Companies and "Firstname" and
"Lastname" from table contacts. Any idea?
Regards,
Gerard.
--
"Who cares if it doesn''t do anything? It was made with our new
Triple-Iso-Bifurcated-Krypton-Gate-MOS
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
2002 Aug 06
2
[ and setMethod conflict?
I noticed this oddity about [ and setMethod.
First, I define testFunc, which sorts a data frame by the first column and
returns the entries that aren't NAs, and testIt, which runs testFunc
repeatedly on a random large data frame, each time saving the return into a
dummy placeholder (for demonstration's sake).
> require(methods)
Loading required package: methods
[1] TRUE
> testFunc
2002 Aug 06
2
[ and setMethod conflict?
I noticed this oddity about [ and setMethod.
First, I define testFunc, which sorts a data frame by the first column and
returns the entries that aren't NAs, and testIt, which runs testFunc
repeatedly on a random large data frame, each time saving the return into a
dummy placeholder (for demonstration's sake).
> require(methods)
Loading required package: methods
[1] TRUE
> testFunc
2011 May 05
2
Compiling a FORTRAN program under Windows 7
Hi,
I am trying to compile a FORTRAN program to call from R under Windows 7 but
I am having problem in the compiling step. To demonstrate this is the
program testit.f:
------------------------------------------
subroutine TESTIT(x,n,m)
dimension x(n)
do 10 i=1,n
10 x(i)=x(i)**m
end
--------------------------------------------
When I compile it with gfortran I get