Class: VagrantPlugins::Fsevents::Logger

Inherits:
Log4r::Logger
  • Object
show all
Defined in:
lib/vagrant-fsevents/logger.rb

Overview

Methods that log to Vagrant’s internal log for debugging

Instance Method Summary collapse

Instance Method Details

#callback_start(mods, adds, removes) ⇒ Object

Logs when the file change callback is triggered



16
17
18
19
20
21
# File 'lib/vagrant-fsevents/logger.rb', line 16

def callback_start(mods, adds, removes)
  info('File change callback called!')
  info("  - Modified: #{mods.inspect}")
  info("  - Added: #{adds.inspect}")
  info("  - Removed: #{removes.inspect}")
end

#change_too_soon(rel_path) ⇒ Object

Logs when a path was changed too quickly and was ignored



24
25
26
27
28
# File 'lib/vagrant-fsevents/logger.rb', line 24

def change_too_soon(rel_path)
  info(
    "Skipping #{rel_path} - was changed too recently"
  )
end

#listening_with_adapter(adapter, paths, ignores) ⇒ Object

Logs listening start messages



6
7
8
9
10
11
12
13
# File 'lib/vagrant-fsevents/logger.rb', line 6

def listening_with_adapter(adapter, paths, ignores)
  info("Listening to paths: #{paths.keys.sort.inspect}")
  info("Listening via: #{adapter}")
  info("Ignoring #{ignores.length} paths:")
  ignores.each do |ignore|
    info("  -- #{ignore}")
  end
end