Class: MongodbLogger::ServerConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/mongodb_logger/server_config.rb

Defined Under Namespace

Classes: ServerLogger

Class Method Summary collapse

Class Method Details

.mongo_adapterObject


23
24
25
# File 'lib/mongodb_logger/server_config.rb', line 23

def mongo_adapter
  @logger.mongo_adapter if @logger
end

.set_config(config_path) ⇒ Object


17
18
19
20
21
# File 'lib/mongodb_logger/server_config.rb', line 17

def set_config(config_path)
  ENV['MONGODBLOGGERCONFIG'] = config_path
  @logger = ServerLogger.new("server.log")
  @logger.mongo_adapter
end