Object
See log4r/NDC.rb
# File lib/log4r/NDC.rb, line 17 17: def self.check_thread_instance() 18: if ( Thread.current[NDCNAME] == nil ) then 19: Thread.current[NDCNAME] = Array.new 20: Thread.current[NDCNAMEMAXDEPTH] = NDCDEFAULTMAXDEPTH 21: end 22: end
# File lib/log4r/NDC.rb, line 24 24: def self.clear() 25: self.check_thread_instance() 26: Thread.current[NDCNAME].clear 27: end
# File lib/log4r/NDC.rb, line 29 29: def self.clone_stack() 30: self.check_thread_instance() 31: return Thread.current[NDCNAME].clone 32: end
# File lib/log4r/NDC.rb, line 51 51: def self.get() 52: self.check_thread_instance 53: return Thread.current[NDCNAME] * " " 54: end
# File lib/log4r/NDC.rb, line 34 34: def self.get_depth() 35: self.check_thread_instance() 36: return Thread.current[NDCNAME].length 37: end
# File lib/log4r/NDC.rb, line 39 39: def self.inherit( a_stack ) 40: if ( a_stack.class == Array ) then 41: if ( Thread.current[NDCNAME] != nil ) then 42: Thread.current[NDCNAME].clear 43: Thread.current[NDCNAME] = nil 44: end 45: Thread.current[NDCNAME] = a_stack 46: else 47: raise "Expecting Array in NDC.inherit" 48: end 49: end
# File lib/log4r/NDC.rb, line 56 56: def self.peek() 57: self.check_thread_instance() 58: return Thread.current[NDCNAME].last 59: end
# File lib/log4r/NDC.rb, line 61 61: def self.pop() 62: self.check_thread_instance() 63: return Thread.current[NDCNAME].pop 64: end
# File lib/log4r/NDC.rb, line 66 66: def self.push( value ) 67: self.check_thread_instance() 68: if ( Thread.current[NDCNAME].length < Thread.current[NDCNAMEMAXDEPTH] ) then 69: Thread.current[NDCNAME].push( value ) 70: end 71: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.