class Alfred::LogUI
Attributes
logdev[R]
Public Class Methods
new(id, to_file=nil)
click to toggle source
Calls superclass method
# File lib/alfred/ui.rb, line 10 def initialize(id, to_file=nil) if to_file @log_file = to_file log_dir = File.dirname(log_file) FileUtils.mkdir_p log_dir unless File.exists? log_dir end super log_file, 'weekly' @progname = id @default_formatter.datetime_format = '%Y-%m-%d %H:%M:%S ' end
Public Instance Methods
log_file()
click to toggle source
# File lib/alfred/ui.rb, line 23 def log_file @log_file ||= File.expand_path("~/Library/Logs/Alfred-Workflow.log") end