Sha256: 21b3eb780b63f9dc57dd7e93769d492a21ea93577bdb5aefd05958d492e4863e

Contents?: true

Size: 1.32 KB

Versions: 357

Compression:

Stored size: 1.32 KB

Contents

#!/usr/bin/env ruby

require 'rbbt-util'
require 'rbbt/util/simpleopt'

$0 = "rbbt #{$previous_commands*""} #{ File.basename(__FILE__) }" if $previous_commands

options = SOPT.setup <<EOF

Change log level

$ rbbt log <level>

DEBUG
LOW
MEDIUM
HIGH
INFO
WARN
ERROR
NONE

-h--help Print this help

EOF
rbbt_usage and exit 0 if options[:help] 
if ARGV.empty?
  if Rbbt.etc.log_severity.exists?                                                                                                                                                         
    puts Rbbt.etc.log_severity.read                                                                                                                                                      
  else                                                                                                                                                                                     
    puts Rbbt.etc.log_severity.find + ' does not exist'                                                                                                                                  
  end                                                                                                                                                                                      
else
  Open.write(Rbbt.etc.log_severity, ARGV[0].upcase)
end


Version data entries

357 entries across 357 versions & 1 rubygems

Version Path
rbbt-util-5.31.12 share/rbbt_commands/log
rbbt-util-5.31.11 share/rbbt_commands/log
rbbt-util-5.31.10 share/rbbt_commands/log
rbbt-util-5.31.9 share/rbbt_commands/log
rbbt-util-5.31.8 share/rbbt_commands/log
rbbt-util-5.31.7 share/rbbt_commands/log
rbbt-util-5.31.5 share/rbbt_commands/log
rbbt-util-5.31.4 share/rbbt_commands/log
rbbt-util-5.31.3 share/rbbt_commands/log
rbbt-util-5.31.2 share/rbbt_commands/log
rbbt-util-5.31.1 share/rbbt_commands/log
rbbt-util-5.31.0 share/rbbt_commands/log
rbbt-util-5.30.13 share/rbbt_commands/log
rbbt-util-5.30.12 share/rbbt_commands/log
rbbt-util-5.30.11 share/rbbt_commands/log
rbbt-util-5.30.10 share/rbbt_commands/log
rbbt-util-5.30.9 share/rbbt_commands/log
rbbt-util-5.30.8 share/rbbt_commands/log
rbbt-util-5.30.7 share/rbbt_commands/log
rbbt-util-5.30.6 share/rbbt_commands/log