lib/loggability/logger.rb in loggability-0.10.1 vs lib/loggability/logger.rb in loggability-0.11.0
- old
+ new
@@ -148,16 +148,22 @@
super( nil )
self.level = if $DEBUG then :debug else :warn end
self.output_to( logdev, *args )
+ @created_from = caller( 3 ).first
@default_formatter = Loggability::Formatter.create( :default )
end
######
public
######
+
+ ##
+ # The line that caused this logger to be created.
+ attr_reader :created_from
+
### Return a human-readable representation of the object suitable for debugging.
def inspect
dev = if self.logdev.respond_to?( :dev )
self.logdev.dev.class