/chef/lib/chef/log.rb

http://github.com/opscode/chef · Ruby · 39 lines · 13 code · 7 blank · 19 comment · 0 complexity · abe671bbfe36a3c4c8ba417854d162c2 MD5 · raw file

  1. #
  2. # Author:: Adam Jacob (<adam@opscode.com>)
  3. # Author:: AJ Christensen (<@aj@opscode.com>)
  4. # Author:: Christopher Brown (<cb@opscode.com>)
  5. # Copyright:: Copyright (c) 2008 Opscode, Inc.
  6. # License:: Apache License, Version 2.0
  7. #
  8. # Licensed under the Apache License, Version 2.0 (the "License");
  9. # you may not use this file except in compliance with the License.
  10. # You may obtain a copy of the License at
  11. #
  12. # http://www.apache.org/licenses/LICENSE-2.0
  13. #
  14. # Unless required by applicable law or agreed to in writing, software
  15. # distributed under the License is distributed on an "AS IS" BASIS,
  16. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17. # See the License for the specific language governing permissions and
  18. # limitations under the License.
  19. require 'logger'
  20. require 'mixlib/log'
  21. class Chef
  22. class Log
  23. extend Mixlib::Log
  24. # Force initialization of the primary log device (@logger)
  25. init
  26. class Formatter
  27. def self.show_time=(*args)
  28. Mixlib::Log::Formatter.show_time = *args
  29. end
  30. end
  31. end
  32. end