lib/sample_cmdlet_patterns/commands/log_meta_data.rb
def execute(input: $stdin, output: $stdout)
        logger = TTY::Logger.new do |config|
          config.metadata = [:date, :time]
        end
        logger.success 'Include structured data', myapp: 'myapp', env: 'prod'

        logger = TTY::Logger.new do |config|
          config.formatter = :json
        end
        logger.info 'Deployed successfully'
        logger.success 'Include structured data', myapp: 'myapp', env: 'prod'

        :gui
      end
# Execute LogMetaData subcommand taking input from
# a input stream and writing to output stream
#
# sample: output.puts 'OK'
Execute LogMetaData subcommand taking input from
a input stream and writing to output stream


Execute LogMetaData subcommand taking input from a input stream and writing to output stream
def execute(input: $stdin, output: $stdout)
        logger = TTY::Logger.new do |config|
          config.metadata = [:date, :time]
        end
        logger.success 'Include structured data', myapp: 'myapp', env: 'prod'
        logger = TTY::Logger.new do |config|
          config.formatter = :json
        end
        logger.info 'Deployed successfully'
        logger.success 'Include structured data', myapp: 'myapp', env: 'prod'
        :gui
      end
def execute ( input : $stdin , output : $stdout ) logger = TTY :: Logger . new do | config | config . metadata = [ :date , :time ] end logger . success 'Include structured data' , myapp : 'myapp' , env : 'prod' logger = TTY :: Logger . new do | config | config . formatter = :json end logger . info 'Deployed successfully' logger . success 'Include structured data' , myapp : 'myapp' , env : 'prod' :gui end
Execute LogMetaData subcommand taking input from
a input stream and writing to output stream
Execute LogMetaData subcommand taking input from a input stream and writing to output stream
input
output