# File lib/puppet/util/log.rb, line 227 227: def initialize(path) 228: @name = path 229: # first make sure the directory exists 230: # We can't just use 'Config.use' here, because they've 231: # specified a "special" destination. 232: unless FileTest.exist?(File.dirname(path)) 233: Puppet.recmkdir(File.dirname(path)) 234: Puppet.info "Creating log directory %s" % File.dirname(path) 235: end 236: 237: # create the log file, if it doesn't already exist 238: file = File.open(path, File::WRONLY|File::CREAT|File::APPEND) 239: 240: @file = file 241: 242: @autoflush = Puppet[:autoflush] 243: end