Class: Funnel::Log

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

Constant Summary collapse

@@threshhold =
1
@@descriptor =

TODO (Maybe): all this can be made way more meta… at the cost of readibility

{
  1 => "DBUG",
  2 => "WARN",
  3 => "INFO"
}

Class Method Summary collapse

Class Method Details

.debug(msg) ⇒ Object



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

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

.debug!Object



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

def self.debug!
  @@threshhold = 1
end

.info(msg) ⇒ Object



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

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

.info!Object



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

def self.info!
  @@threshhold = 3
end

.shutthefuckup!Object



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

def self.shutthefuckup!
  @@threshhold = 4
end

.warn!Object



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

def self.warn!
  @@threshhold = 2
end

.warning(msg) ⇒ Object



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

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