diff --git a/bin/hobo b/bin/hobo index ebc5b6c54..f3592c4bf 100755 --- a/bin/hobo +++ b/bin/hobo @@ -1,6 +1,6 @@ #!/usr/bin/env ruby begin - require File.expand_path('../.bundle/environment', __FILE__) + require File.expand_path('../../.bundle/environment', __FILE__) rescue LoadError # Fallback on doing the resolve at runtime. require "rubygems" @@ -14,4 +14,4 @@ GitStyleBinary.primary do version "Somewhere between 0 and 0.1" run { educate } -end \ No newline at end of file +end diff --git a/bin/hobo-down b/bin/hobo-down index 7463d59e4..27103e5aa 100755 --- a/bin/hobo-down +++ b/bin/hobo-down @@ -1,6 +1,6 @@ #!/usr/bin/env ruby begin - require File.expand_path('../.bundle/environment', __FILE__) + require File.expand_path('../../.bundle/environment', __FILE__) rescue LoadError # Fallback on doing the resolve at runtime. require "rubygems" @@ -27,4 +27,4 @@ EOS run do |command| Hobo::VM.down end -end \ No newline at end of file +end diff --git a/bin/hobo-resume b/bin/hobo-resume index 441f2177c..26fa81c32 100755 --- a/bin/hobo-resume +++ b/bin/hobo-resume @@ -1,6 +1,6 @@ #!/usr/bin/env ruby begin - require File.expand_path('../.bundle/environment', __FILE__) + require File.expand_path('../../.bundle/environment', __FILE__) rescue LoadError # Fallback on doing the resolve at runtime. require "rubygems" diff --git a/bin/hobo-ssh b/bin/hobo-ssh index 7371e4b45..49d83890b 100755 --- a/bin/hobo-ssh +++ b/bin/hobo-ssh @@ -1,6 +1,6 @@ #!/usr/bin/env ruby begin - require File.expand_path('../.bundle/environment', __FILE__) + require File.expand_path('../../.bundle/environment', __FILE__) rescue LoadError # Fallback on doing the resolve at runtime. require "rubygems" @@ -27,4 +27,4 @@ EOS run do |command| Hobo::VM.ssh end -end \ No newline at end of file +end diff --git a/bin/hobo-suspend b/bin/hobo-suspend index e9993d588..5e7311267 100755 --- a/bin/hobo-suspend +++ b/bin/hobo-suspend @@ -1,6 +1,6 @@ #!/usr/bin/env ruby begin - require File.expand_path('../.bundle/environment', __FILE__) + require File.expand_path('../../.bundle/environment', __FILE__) rescue LoadError # Fallback on doing the resolve at runtime. require "rubygems" diff --git a/bin/hobo-up b/bin/hobo-up index a16a5d622..6db9865d5 100755 --- a/bin/hobo-up +++ b/bin/hobo-up @@ -1,6 +1,6 @@ #!/usr/bin/env ruby begin - require File.expand_path('../.bundle/environment', __FILE__) + require File.expand_path('../../.bundle/environment', __FILE__) rescue LoadError # Fallback on doing the resolve at runtime. require "rubygems" @@ -27,4 +27,4 @@ EOS run do |command| Hobo::VM.up end -end \ No newline at end of file +end diff --git a/lib/hobo.rb b/lib/hobo.rb index 23913541f..b0b6cde08 100644 --- a/lib/hobo.rb +++ b/lib/hobo.rb @@ -16,5 +16,5 @@ require 'hobo/vm' # TODO: Make this configurable log_output = ENV['HOBO_ENV'] == 'test' ? nil : STDOUT -HOBO_LOGGER = Logger.new(log_output) +HOBO_LOGGER = Hobo::Logger.new(log_output) Hobo::Env.load! unless ENV['HOBO_ENV'] == 'test' diff --git a/lib/hobo/util.rb b/lib/hobo/util.rb index 36c18a22d..df91b1196 100644 --- a/lib/hobo/util.rb +++ b/lib/hobo/util.rb @@ -15,5 +15,11 @@ error HOBO_LOGGER end end + + class Logger < ::Logger + def format_message(level, time, progname, msg) + "[#{level} #{time.strftime('%m-%d-%Y %X')}] Hobo: #{msg}\n" + end + end end