```ruby
# lib/frecon/database.rb
#
# Copyright (C) 2014 Christopher Cooper, Sam Craig, Tiger Huang, Vincent Mai, Sam Mercier, and Kristofer Rye
#
# This file is part of FReCon, an API for scouting at FRC Competitions, which is
# licensed under the MIT license.  You should have received a copy of the MIT
# license with this program.  If not, please see
# <http://opensource.org/licenses/MIT>.

require 'logger'

require 'frecon/base/variables'

require 'mongoid'
require 'frecon/mongoid/criteria'

require 'tempfile'
require 'yaml'

require 'frecon/models'

module FReCon
	# Public: A system to set up the database.
	class Database

		# Public: Set up the database.
		def self.setup!
			Mongoid.load!(File.join(File.dirname(__FILE__), 'mongoid.yml'), FReCon::ENVIRONMENT.variable)

			if FReCon::ENVIRONMENT.console['level']
				Mongoid.logger = Logger.new($stdout)
				Mongoid.logger.level = Logger::DEBUG

				Moped.logger = Logger.new($stdout)
				Moped.logger.level = Logger::DEBUG
			end
		end

	end
end
```

Use more intelligent parsing solution for Logger.level sets
user
```ruby
# lib/frecon/database.rb
#
# Copyright (C) 2014 Christopher Cooper, Sam Craig, Tiger Huang, Vincent Mai, Sam Mercier, and Kristofer Rye
#
# This file is part of FReCon, an API for scouting at FRC Competitions, which is
# licensed under the MIT license.  You should have received a copy of the MIT
# license with this program.  If not, please see
# <http://opensource.org/licenses/MIT>.

require 'logger'

require 'frecon/base/variables'

require 'mongoid'
require 'frecon/mongoid/criteria'

require 'tempfile'
require 'yaml'

require 'frecon/models'

module FReCon
	# Public: A system to set up the database.
	class Database

		# Public: Set up the database.
		def self.setup!
			Mongoid.load!(File.join(File.dirname(__FILE__), 'mongoid.yml'), FReCon::ENVIRONMENT.variable)

			level = case (defined_level = FReCon::ENVIRONMENT.console['level'])
			        when /^d/i
				        ::Logger::DEBUG
			        when /^e/i
				        ::Logger::ERROR
			        when /^f/i
				        ::Logger::FATAL
			        when /^i/i
				        ::Logger::INFO
			        when /^u/i
				        ::Logger::UNKNOWN
			        when /^w/i
				        ::Logger::WARN
			        else
				        ::Logger::WARN
			        end

			if !!defined_level
				Mongoid.logger = Logger.new($stdout)
				Mongoid.logger.level = level

				Moped.logger = Logger.new($stdout)
				Moped.logger.level = level
			end
		end

	end
end
```
assistant