Class: Locd::CLI::Command::Main
- Includes:
- Thor::Completion::Bash
- Defined in:
- lib/locd/cli/command/main.rb
Overview
CLI interface using the Thor via my atli fork.
Constant Summary collapse
- LOG_LEVEL_STRINGS =
Just the symbol log levels from SemnaticLogger::LEVELS converted to frozen strings
SemanticLogger::LEVELS.map { |sym| sym.to_s.freeze }
Instance Method Summary collapse
- #config ⇒ Object
-
#initialize(args = [], local_options = {}, config = {}) ⇒ Main
constructor
Wrap Thor#initialize to call #init_setup_logging after letting
superdo it's thing so logging is setup before we do anything else. - #version ⇒ Object
Constructor Details
#initialize(args = [], local_options = {}, config = {}) ⇒ Main
Wrap Thor#initialize to call #init_setup_logging after letting super
do it's thing so logging is setup before we do anything else.
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/locd/cli/command/main.rb', line 105 def initialize args = [], = {}, config = {} super args, , config # If anything raises in here, the command seems to just silently exit..? begin init_setup_logging! rescue Exception => e $stderr.write \ "ERROR: #{ e. } #{ e.class }\n#{ e.backtrace.join( "\n" ) }\n" end logger.debug "initialized", args: args, local_options: , options: self. end |