class GitReflow::Logger
Constants
- COLORS
- DEFAULT_LOG_FILE
Public Class Methods
new(*args)
click to toggle source
Calls superclass method
# File lib/git_reflow/logger.rb, line 15 def initialize(*args) log_file = args.shift || log_file_path args.unshift(log_file) super(*args) @formatter = SimpleFormatter.new end
Private Instance Methods
log_file_path()
click to toggle source
# File lib/git_reflow/logger.rb, line 36 def log_file_path return @log_file_path if "#{@log_file_path}".length > 0 # Here we have to run the command in isolation to avoid a recursive loop # to log this command run to fetch the config setting. configured_log_file_path = %x{git config --get reflow.log-file-path} if configured_log_file_path.length > 0 @log_file_path = configured_log_file_path else @log_file_path = DEFAULT_LOG_FILE end end