Allow logging to be sent to a file
In config.rb, you can write: logger 'middleman.log'
This commit is contained in:
parent
e773e8c1a9
commit
12de88e8d7
2 changed files with 8 additions and 6 deletions
|
@ -48,6 +48,9 @@ module Middleman
|
|||
# @return [Middleman::Logger] The logger
|
||||
def self.logger(*args)
|
||||
if !@_logger || args.length > 0
|
||||
if args.length == 1 && (args.first.is_a?(::String) || args.first.respond_to?(:write))
|
||||
args = [0, false, args.first]
|
||||
end
|
||||
@_logger = ::Middleman::Logger.new(*args)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue