Class: TClass

Inherits:
Object
  • Object
show all
Extended by:
Logging
Includes:
Logging
Defined in:
lib/logging.rb

Constant Summary collapse

@@log =
init_logger(STDOUT, Logger::INFO)

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Logging

init_logger, log_level=, log_target=

Methods included from File_Checking

#file_check, file_check

Class Method Details

.test_logObject


181
182
183
184
# File 'lib/logging.rb', line 181

def self::test_log
	@log.info('class-level logger called from class: ' << @log.to_s)
	@@log.info('AGAIN: class-level logger called from class: ' << @log.to_s)
end

Instance Method Details

#test_logObject

<———


168
169
170
171
172
173
174
175
176
177
178
179
180
# File 'lib/logging.rb', line 168

def test_log
	@@log.info('class-level logger called from instance: ' << @@log.to_s)	#@log = @@log # works too

	@log = TClass.class_eval{@log}
	@log.info('AGAIN: class-level logger called from instance: ' << @log.to_s)
	@log.debug("you won't see this on log-level INFO")

	# object-level ---->
	init_logger	# <-----------

	@log.info("That's a different thing: " << @log.to_s << " - object-level logger!")

end