Displaying 20 results from an estimated 30000 matches similar to: "Using Rails.Logger in a gem in Rails 3beta3"
2004 May 02
1
arima problems when using argument fixed=
As I am reading ?arima, only NA entries in the argument fixed=
imports. The following seems to indicate otherwise:
x <- arima.sim(model=list(ar=0.8), n=100) + (1:100)/50
> t <- 1:100
> mod1 <- lm(x ~ t)
>
> init1 <- c(0, coef(mod1)[2])
> fixed1 <- c(as.numeric(NA), 0)
>
> arima(x, order=c(1,0,0), xreg=t, include.mean=FALSE, init=init1,
fixed=fixed1)
2012 Feb 02
0
[LLVMdev] How to improve code generated for 'getelementptr' ?
Hi all,
I am working on an llvm backend for a processor with a relative simple instruction set.
For small loops, the code that is produced depends heavily on how the loop is specified:
The less information we provide to clang, the better the loop code becomes...
Any idea how I can learn llvm that we don't have load/store instructions with register index,
so that it is more efficient to
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
2008 Jun 12
1
how do I mock the Rails Logger with should_receive?
Hey Guys,
I''m trying to mock the Rails Logger for the following code:
...
rescue TimeoutError => error
$logger.error("#{self.name} Timeout for #{path}: #{error}") and return
rescue SocketError => error
$logger.error("#{self.name} SocketError for #{path}: #{error}") and
return
rescue StandardError => error
2008 Jun 12
1
Does anyone know how to mock the Rails Logger then set expectations with should_receive?
Hey Guys,
I''m trying to mock the Rails Logger for the following code:
...
rescue TimeoutError => error
$logger.error("#{self.name} Timeout for #{path}: #{error}") and return
rescue SocketError => error
$logger.error("#{self.name} SocketError for #{path}: #{error}") and
return
rescue StandardError => error
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/.
2006 Nov 16
0
Rails logger doesn't log nil, Ruby logger does
Is there some reason that the Rails logger doesn''t log nil as the string
"nil", like the Ruby logger does? It is a bit confusing.
Ruby example:
$ cat log.rb
require ''logger''
logger = Logger.new(STDOUT)
logger.info "test"
logger.info true
logger.info nil
logger.info "end test"
$ ruby log.rb
I, [2006-11-15T16:45:00.348262 #2058] INFO
2012 Oct 05
1
Is Rails Logger Thread Safe?
Is Rails Logger truly not Thread Safe?
http://log.kares.org/2011/04/railslogger-is-not-threadsafe.html
This seems like an issue that should have been picked up quite a long time
ago. I just set config.threadsafe! in my config/application.rb and my log
output from rails server has completely disappeared.
If the logger is not thread-safe, I cannot help but wonder how much of the
Rails core is
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/.
2005 Sep 20
1
Javascript Logger and Console
Hey,
I put together a javascript logger and console that has made my coding
life a breeze, so I thought I would share it with you guys.
Check out the demo http://gleepglop.com/javascripts/logger/
Some features are...
- Toggle button so it is visiable when you need it and out of the way
when you don''t.
- Auto-positions itself at the bottom of the window so output is easy to read.
-
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
2007 May 21
2
logger anybody?
Hello,
When trying to use logger into any RSpec I get:
logger anyboundefined local variable or method `logger'' for
#<#<Class:0x278bee0>:0x253cdec>
Not sure if this is the spected behaviour (haven''t checked under the
hood) It was just annoying not having a logger instance available as in
Rails out of the tests.
--
An?bal Rojas
http://www.rubycorner.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 May 19
1
logging with the daemons gem
I am trying to leverage the daemons gem but I am confused about the
proper way to set up logging. I am able pass options which configure
stdout to go to a log file but it seems like all calls to Rails.logger
are disabled as I see the following message in my output:
usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
active_support/buffered_logger.rb:99:in `write'': closed
2010 Jan 18
5
Re: puts & logger ... flush immediately
Marnen Laibow-Koser wrote:
> Ralph Shnelvar wrote:
>> newbie here ...
>>
>> I am tracing logic putting puts and logger.info calls in my code.
>>
>> I _think_ Rails is buffering output so that I can''t see what happens
>> until I close out webrick.
>
> But you are probably wrong. If you watch the log scroll by, you will
> generally see
2020 Jun 03
2
problem with logger: syslog vs. file
On Wed, 3 Jun 2020, Fourhundred Thecat wrote:
>> On 2020-06-03 12:18, Tony Mountifield wrote:
>> In article <88f96e46-e6bb-a7ef-bebb-5588ef6cd6c1 at gmx.ch>,
>>
>> However, the conversation would then be: should both logging types include
>> line number and function? should both logging types omit them? should
>> it be a configuration option in
2014 Mar 04
2
Pipe into logger duplicates messages in /var/log/messages
I am trying to pipe the output from a process into syslog using the logger
command. Initially I pipe the output into a separate file, but as it
happens
this filled up the disk when things went wrong. So I figured I redirect the
output to syslog and let logrotate deal with the roll-over and archive
of the
file.
However the following command :
echo "HI" > logger -t test
Resulted in
2014 Oct 23
1
logger.conf
with the below defined in logger.conf on 11.6 cert 6
I am not getting any log message other than notice and warning in any files
when doing module reload logger - queue log is the only one that says it
restarts
*CLI> module reload logger
== Parsing '/etc/asterisk/logger.conf': Found
Asterisk Queue Logger restarted
built fresh box with make samples - added 2 stations, dialing from
2010 Aug 26
7
Climate data logger ... !
Hello everyone ...
Before I give up and install windows on my HD as well :-)
Maybe there is a solution.
The program to read the sampled data in the data-logger can be installed and started using WINE without problems. But the driver (which is installed separately) which allows the Data-logger to be recognised by the program on the USB port, cannot be installed.
Its name is "Silicon
2006 Jun 09
1
logrotate and logger reload
I have one system that went totally crazy on me.
It went into an infinite loop rotating * message and log files.
From the asterisk console I kept seeing the message about re-loading
logger.conf over and over and it just kept creating more and more files.
I baby set many different * boxes all running the same script without
this problem.
Here is my cron script:
/var/log/asterisk/cdr-csv/*csv {