Class: CloudSync::Log

Inherits:
Object
  • Object
show all
Defined in:
lib/cloud_sync/log.rb

Class Method Summary collapse

Class Method Details

.debug(msg) ⇒ Object



14
15
16
# File 'lib/cloud_sync/log.rb', line 14

def self.debug msg
  log(msg,1) if @threshhold <= 1
end

.debug!Object



30
31
32
# File 'lib/cloud_sync/log.rb', line 30

def self.debug!
  @threshhold = 1
end

.error(msg) ⇒ Object



26
27
28
# File 'lib/cloud_sync/log.rb', line 26

def self.error msg
  log(msg,4) if @threshhold <= 4
end

.info(msg) ⇒ Object



22
23
24
# File 'lib/cloud_sync/log.rb', line 22

def self.info msg
  log(msg,3) if @threshhold <= 3
end

.info!Object



38
39
40
# File 'lib/cloud_sync/log.rb', line 38

def self.info!
  @threshhold = 3
end

.is_debug?Boolean

Returns:

  • (Boolean)


46
47
48
# File 'lib/cloud_sync/log.rb', line 46

def self.is_debug?
    @threshhold == 1
end

.shutthefuckup!Object



42
43
44
# File 'lib/cloud_sync/log.rb', line 42

def self.shutthefuckup!
  @threshhold = 4
end

.warn!Object



34
35
36
# File 'lib/cloud_sync/log.rb', line 34

def self.warn!
  @threshhold = 2
end

.warning(msg) ⇒ Object



18
19
20
# File 'lib/cloud_sync/log.rb', line 18

def self.warning msg
  log(msg,2) if @threshhold <= 2
end