Module: BuildTool
- Defined in:
- lib/build-tool/model/setting.rb,
lib/build-tool/errors.rb,
lib/build-tool/recipe.rb,
lib/build-tool/server.rb,
lib/build-tool/sshkey.rb,
lib/build-tool/vcs/git.rb,
lib/build-tool/vcs/svn.rb,
lib/build-tool/version.rb,
lib/build-tool/cfg/node.rb,
lib/build-tool/commands.rb,
lib/build-tool/vcs/base.rb,
lib/build-tool/singleton.rb,
lib/build-tool/vcs/bazar.rb,
lib/build-tool/cfg/parser.rb,
lib/build-tool/repository.rb,
lib/build-tool/application.rb,
lib/build-tool/cfg/visitor.rb,
lib/build-tool/commands/gc.rb,
lib/build-tool/environment.rb,
lib/build-tool/vcs/archive.rb,
lib/build-tool/vcs/git-svn.rb,
lib/build-tool/model/module.rb,
lib/build-tool/state_helper.rb,
lib/build-tool/commands/info.rb,
lib/build-tool/configuration.rb,
lib/build-tool/model/feature.rb,
lib/build-tool/vcs/mercurial.rb,
lib/build-tool/cfg/lexer_base.rb,
lib/build-tool/commands/build.rb,
lib/build-tool/commands/ctags.rb,
lib/build-tool/commands/fetch.rb,
lib/build-tool/commands/files.rb,
lib/build-tool/build-system/qt.rb,
lib/build-tool/command_actions.rb,
lib/build-tool/commands/rebase.rb,
lib/build-tool/commands/history.rb,
lib/build-tool/commands/install.rb,
lib/build-tool/commands/modules.rb,
lib/build-tool/commands/recipes.rb,
lib/build-tool/model/module_log.rb,
lib/build-tool/build-system/base.rb,
lib/build-tool/build-system/make.rb,
lib/build-tool/build-system/none.rb,
lib/build-tool/commands/features.rb,
lib/build-tool/model/command_log.rb,
lib/build-tool/build-system/cmake.rb,
lib/build-tool/build-system/qmake.rb,
lib/build-tool/commands/configure.rb,
lib/build-tool/build-system/custom.rb,
lib/build-tool/build-system/kdel10n.rb,
lib/build-tool/commands/recipes/add.rb,
lib/build-tool/build-system/autoconf.rb,
lib/build-tool/commands/environments.rb,
lib/build-tool/commands/modules/info.rb,
lib/build-tool/commands/modules/list.rb,
lib/build-tool/commands/recipes/edit.rb,
lib/build-tool/commands/recipes/info.rb,
lib/build-tool/commands/recipes/list.rb,
lib/build-tool/commands/configuration.rb,
lib/build-tool/commands/features/list.rb,
lib/build-tool/commands/modules/shell.rb,
lib/build-tool/commands/modules/enable.rb,
lib/build-tool/commands/modules/status.rb,
lib/build-tool/commands/features/enable.rb,
lib/build-tool/commands/modules/cleanup.rb,
lib/build-tool/commands/modules/disable.rb,
lib/build-tool/commands/recipes/install.rb,
lib/build-tool/commands/environments/set.rb,
lib/build-tool/commands/features/disable.rb,
lib/build-tool/commands/recipes/incoming.rb,
lib/build-tool/commands/environments/list.rb,
lib/build-tool/commands/configuration/edit.rb,
lib/build-tool/commands/configuration/list.rb
Overview
This class uses the active_record logger !!!!!!!!!!!!!!!!
Defined Under Namespace
Modules: BuildSystem, Cfg, Commands, History, ModuleActions, StateHelper, VCS Classes: Application, BuildToolConfiguration, Configuration, ConfigurationError, Environment, Error, Feature, Module, ParseError, Recipe, Repository, Server, Setting, Singleton, SshKey, Version
Constant Summary collapse
Class Method Summary collapse
Class Method Details
.main(name, args, root_directory) ⇒ Object
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
# File 'lib/build-tool/application.rb', line 132 def BuildTool.main(name, args, root_directory) Dir.chdir( ENV["HOME"] ) begin # Setup logging Logging.logger.root.level = :debug2 # Special case for the configurationParser. It is very verbose if active. Logging.logger['BuildTool::Cfg::Parser'].level = :info # Same goes for the activerecord logger, :info shows migrations Logging.logger['ActiveRecord'].level = :warn ActiveRecord::Base.logger = ::Logging::Logger['ActiveRecord'] # By default write only :info messages to stdout Logging.logger['root'].add_appenders( Logging.appenders.stdout( :layout => MJ::Logging::BasicLayout.new(), :level => :info) ) # Create the application app = BuildTool::Application.new( name, root_directory ) # Execute the application return app.main( args ) rescue Interrupt => e logger.info "User interrupt!" return 0 rescue BuildTool::Error => e logger.error( e. ) logger.verbose( e.backtrace.join("\n") ) return -1 rescue Exception => e logger.error( e ) logger.verbose( e.backtrace.join("\n") ) return -1 end end |