net.sourceforge.acelogger.location.gatherer
Class FileAndLineLocationGatherer

java.lang.Object
  extended by net.sourceforge.acelogger.location.gatherer.BaseLocationGatherer
      extended by net.sourceforge.acelogger.location.gatherer.FileAndLineLocationGatherer
All Implemented Interfaces:
Identifiable, LocationGatherer

public class FileAndLineLocationGatherer
extends BaseLocationGatherer

An implementation of LocationGatherer that discovers only the file and line of the caller.

Since:
1.0.0
Version:
1.0.0
Author:
Zardi (https://sourceforge.net/users/daniel_zardi)

Constructor Summary
FileAndLineLocationGatherer(String identifier)
          Constructs a FileAndLineLocationGatherer with the supplied identifier and a UserCodeFrameResolver as it's resolver.
FileAndLineLocationGatherer(String identifier, CodeFrameResolver frameResolver)
          Constructs a FileAndLineLocationGatherer with the supplied identifier and resolver.
 
Method Summary
 LogEventLocation getCallLocation(Thread currentThread)
          Obtains the log call location, such as the package, class and method names.
 
Methods inherited from class net.sourceforge.acelogger.location.gatherer.BaseLocationGatherer
getCallLocation, getCodeFrameResolver, getIdentifier, getUserCodeFrame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileAndLineLocationGatherer

public FileAndLineLocationGatherer(String identifier)
Constructs a FileAndLineLocationGatherer with the supplied identifier and a UserCodeFrameResolver as it's resolver.

Parameters:
identifier - A string that identifies this gatherer.
Since:
1.0.0

FileAndLineLocationGatherer

public FileAndLineLocationGatherer(String identifier,
                                   CodeFrameResolver frameResolver)
Constructs a FileAndLineLocationGatherer with the supplied identifier and resolver.

Parameters:
identifier - A string that identifies this gatherer.
frameResolver - The resolver that should be used to generate caller information.
Since:
1.0.0
Method Detail

getCallLocation

public LogEventLocation getCallLocation(Thread currentThread)
Obtains the log call location, such as the package, class and method names.

Parameters:
currentThread - The thread that originated the call.
Returns:
A logCallLocation with information of the caller location.


Copyright © 2007-2010 The AceLogger Team. All Rights Reserved.