Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Martin Rhoads
committed
Jan 16, 2013
1 parent
1a10f74
commit 70e4c09
Showing
7 changed files
with
131 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export DATA_BAG_DIR=/Users/martin/Dropbox/airbnb/src/chef/data_bags | ||
export COOKBOOK_DIR=/Users/martin/Dropbox/airbnb/src/chef/cookbooks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
module Nerve | ||
module Logging | ||
|
||
def log | ||
@logger ||= Logging.logger_for(self.class.name) | ||
end | ||
|
||
# Use a hash class-ivar to cache a unique Logger per class: | ||
@loggers = {} | ||
|
||
class << self | ||
def logger_for(classname) | ||
@loggers[classname] ||= configure_logger_for(classname) | ||
end | ||
|
||
def configure_logger_for(classname) | ||
logger = Logger.new(STDOUT) | ||
logger.progname = classname | ||
logger | ||
end | ||
|
||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.