• Narrow screen resolution
  • Wide screen resolution
  • Auto width resolution
  • Increase font size
  • Decrease font size
  • Default font size
  • default color
  • red color
  • green color

Got Good Credit ?

Wednesday
May 23rd
FireBoard
Welcome, Guest
Please Login or Register.    Lost Password?
ruby use system variable Is it ellegant to use a global variable to store a Logger object? (0 viewing) 
Go to bottom Post Reply Favoured: 0
TOPIC: ruby use system variable Is it ellegant to use a global variable to store a Logger object?
#43721
ruby use system variable Is it ellegant to use a global variable to store a Logger object?  
Hi, I use Logger class in a programm and since I need to log in lot of different places (into classes, into methods...) I use a global variable in this way:   $log = Logger.new   $log.debug ... so I can use $log anywhere in the code. Is it ellegant and the Ruby way ? The other possibility I see is creating a class that stores the logger instance into a @@class_variable (@@logger) and call class method anywhere in the code:   class MyLogger     @@logger = Logger.new     def self.debug(x)       @@logger.debug(x)     end     ...   end   MyLogger.debug ... Which is a more ellegant way? is there other option? Thanks for any advice I could receive from you.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
      Topics Author Date
    thread link
ruby use system variable Is it ellegant to use a global variable to store a Logger object?
I?aki Baz Castillo 2008/06/28 08:45
    thread link
thread linkthread link ruby use system variable Is it ellegant to use a global variable to store a Logger object?
Suraj Kurapati 2008/06/28 08:45
    thread link
thread linkthread link ruby use system variable Is it ellegant to use a global variable to store a Logger object?
I?aki Baz Castillo 2008/06/28 08:45
    thread link
thread linkthread link ruby use system variable Is it ellegant to use a global variable to store a Logger object?
Suraj Kurapati 2008/06/28 08:45
    thread link
thread linkthread link ruby use system variable Is it ellegant to use a global variable to store a Logger object?
I?aki Baz Castillo 2008/06/28 08:45
    thread link
thread linkthread link ruby use system variable Is it ellegant to use a global variable to store a Logger object?
Suraj Kurapati 2008/06/28 08:45
    thread link
thread linkthread link ruby use system variable Is it ellegant to use a global variable to store a Logger object?
Suraj Kurapati 2008/06/28 08:45
    thread link
thread linkthread link ruby use system variable Is it ellegant to use a global variable to store a Logger object?
Robert Klemme 2008/06/28 08:45
    thread link
thread linkthread link ruby use system variable Is it ellegant to use a global variable to store a Logger object?
I?aki Baz Castillo 2008/06/28 08:45
    thread link
thread linkthread link ruby use system variable Is it ellegant to use a global variable to store a Logger object?
Suraj Kurapati 2008/06/28 08:45
    thread link
thread linkthread link ruby use system variable Is it ellegant to use a global variable to store a Logger object?
ara.t.howard 2008/06/28 08:45
    thread link
thread linkthread link ruby use system variable Is it ellegant to use a global variable to store a Logger object?
I?aki Baz Castillo 2008/06/28 08:45
    thread link
thread linkthread link ruby use system variable Is it ellegant to use a global variable to store a Logger object?
Suraj Kurapati 2008/06/28 08:45
    thread link
thread linkthread link ruby use system variable Is it ellegant to use a global variable to store a Logger object?
ara.t.howard 2008/06/28 08:45
    thread link
thread linkthread link ruby use system variable Is it ellegant to use a global variable to store a Logger object?
Andrea Fazzi 2008/06/28 08:45
    thread link
thread linkthread link ruby use system variable Is it ellegant to use a global variable to store a Logger object?
I?aki Baz Castillo 2008/06/28 08:45
    thread link
thread linkthread link ruby use system variable Is it ellegant to use a global variable to store a Logger object?
Robert Klemme 2008/06/28 08:45
    thread link
thread linkthread link ruby use system variable Is it ellegant to use a global variable to store a Logger object?
Robert Dober 2008/06/28 08:45
    thread link
thread linkthread link ruby use system variable Is it ellegant to use a global variable to store a Logger object?
Robert Klemme 2008/06/28 08:45
    thread link
thread linkthread link ruby use system variable Is it ellegant to use a global variable to store a Logger object?
Andrea Fazzi 2008/06/28 08:45
    thread link
thread linkthread link ruby use system variable Is it ellegant to use a global variable to store a Logger object?
Robert Dober 2008/06/28 08:45
    thread link
thread linkthread link ruby use system variable Is it ellegant to use a global variable to store a Logger object?
Andrea Fazzi 2008/06/28 08:45
    thread link
thread linkthread link ruby use system variable Is it ellegant to use a global variable to store a Logger object?
Robert Klemme 2008/06/28 08:45
    thread link
thread linkthread link ruby use system variable Is it ellegant to use a global variable to store a Logger object?
Chuck Remes 2008/06/28 08:45
    thread link
thread linkthread link ruby use system variable Is it ellegant to use a global variable to store a Logger object?
Robert Dober 2008/06/28 08:45
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop
 

Short News

Cache Directory Unwriteable


The record number of countries will be penalized for an excessive deficit

Tackling the crisis in the States absorbs a quantity of Dubai Marina Towers Al Mass Englisch online lernen nice pics money that the situation in the budgets of countries is becoming increasingly tense. Sometimes you can even the impression that the authorities of the country completely lost control of the state of equilibrium in the public hand. Excessive deficit begins to consume more and more countries from the EU, the EC decided to take the steps to run against some of the excessive Harbour Residences previews.deluxe-car.co.uk Denver Real Estate deficit procedure.

Global economic crisis is increasingly beginning to impress their niechlubne influenced the condition of the public finance sector in the EU. The result is a deepening gap between the level of income and expenditure budgets of the member countries, and consequently further software developer jobs motor.world-auto.co.uk memorial patches increase their current debt.

Today the governments of many EU countries are becoming major problems in order to maintain the budget deficit in the toes and thus does not exceed the permissible limit of 3 percent. GDP, which was provided for in the Treaty of villas to buy house by the sea Cleaning London Maastricht. Unfortunately, it probably will be few of them. Do not respect the EU standards in this matter at the initial stage, may threaten the imposition of financial sanctions on the country, and then complete with money coming mostly from EU funds. NB the occurrence of excessive deficits in the Member States of the Community also raises issues associated with maintaining the overall level of its stability, and thus the credibility and in the remortgage loan World Escorts marchesa international arena.


<1c0c6cead93055e8a0d2939e9d31062b>-ERRORnowritablePlik nie ma ustawionych praw do zapisu Pozycjonowanie 902 903