# File lib/puppet/util/log/destinations.rb, line 55 55: def initialize(path) 56: @name = path 57: # first make sure the directory exists 58: # We can't just use 'Config.use' here, because they've 59: # specified a "special" destination. 60: unless FileTest.exist?(File.dirname(path)) 61: Puppet.recmkdir(File.dirname(path)) 62: Puppet.info "Creating log directory #{File.dirname(path)}" 63: end 64: 65: # create the log file, if it doesn't already exist 66: file = File.open(path, File::WRONLY|File::CREAT|File::APPEND) 67: 68: @file = file 69: 70: @autoflush = Puppet[:autoflush] 71: end