Module: Bio::GFFbrowser::Helpers::Logger
- Includes:
- Log
- Included in:
- Digest::LruCacheHelpers::SeekLinkedRecs, Digest::LruTracker, Digest::NoCacheHelpers::SeekLinkedRecs, Digest::Parser, FastLineParser, Gff3Component, Gff3Sequence, LinkedRecs, Record
- Defined in:
- lib/bio/output/gfflogger.rb
Instance Method Summary collapse
- #debug(str, id = '') ⇒ Object
- #error(str, id = '') ⇒ Object
- #info(str, id = '') ⇒ Object
- #log_sys_info(msg) ⇒ Object
- #warn(str, id = '') ⇒ Object
Instance Method Details
#debug(str, id = '') ⇒ Object
10 11 12 13 |
# File 'lib/bio/output/gfflogger.rb', line 10 def debug str, id='' log = LoggerPlus['bio-gff3'] log.debug str+" <#{id}>" end |
#error(str, id = '') ⇒ Object
25 26 27 28 29 |
# File 'lib/bio/output/gfflogger.rb', line 25 def error str, id='' log = LoggerPlus['bio-gff3'] log.error_(str+" <#{id}>",:act => FailOnError.new) end |
#info(str, id = '') ⇒ Object
15 16 17 18 |
# File 'lib/bio/output/gfflogger.rb', line 15 def info str, id='' log = LoggerPlus['bio-gff3'] log.info str+" <#{id}>" end |
#log_sys_info(msg) ⇒ Object
31 32 33 34 35 36 37 38 |
# File 'lib/bio/output/gfflogger.rb', line 31 def log_sys_info msg log = LoggerPlus['bio-gff3'] rmem = `ps -o rss= -p #{Process.pid}`.to_i vmem = `ps -o vsz= -p #{Process.pid}`.to_i if rmem or vmem log.info7 "Memory used #{msg} RAM #{rmem/1024}M, VMEM #{vmem/1024}M" end end |
#warn(str, id = '') ⇒ Object
20 21 22 23 |
# File 'lib/bio/output/gfflogger.rb', line 20 def warn str, id='' log = LoggerPlus['bio-gff3'] log.warn str+" <#{id}>" end |