lib/sportdb/cli/main.rb in sportdb-1.1.0 vs lib/sportdb/cli/main.rb in sportdb-1.2.0
- old
+ new
@@ -2,10 +2,11 @@
require 'commander/import'
# our own code / additional for cli only
+require 'logutils/db'
require 'sportdb/cli/opts'
program :name, 'sportdb'
program :version, SportDB::VERSION
@@ -58,9 +59,11 @@
puts "Connecting to db using settings: "
pp db_config
ActiveRecord::Base.establish_connection( db_config )
+
+ LogDb.setup # start logging to db
end
command :create do |c|
c.syntax = 'sportdb create [options]'