All Packages Class Hierarchy This Package Previous Next Index
Class websphinx.EventLog
java.lang.Object
|
+----websphinx.EventLog
- public class EventLog
- extends Object
- implements CrawlListener, LinkListener
Crawling monitor that writes messages to standard output or a file.
Acts as both a CrawlListener (monitoring start and end of the crawl)
and as a LinkListener (monitoring page retrieval).
-
EventLog()
- Make a EventLog that writes to standard output.
-
EventLog(OutputStream)
- Make a EventLog that writes to a stream.
-
EventLog(String)
- Make a EventLog that writes to a file.
-
cleared(CrawlEvent)
- Notify that the crawler's state was cleared.
-
crawled(LinkEvent)
- Notify that a link event occured.
-
getOnlyNetworkEvents()
- Test whether logger prints only network-related LinkEvents.
-
monitor(Crawler)
- Create a EventLog that prints to standard error and attach it to a crawler.
-
paused(CrawlEvent)
- Notify that the crawler paused.
-
setOnlyNetworkEvents(boolean)
- Set whether logger prints only network-related LinkEvents.
-
started(CrawlEvent)
- Notify that the crawler started.
-
stopped(CrawlEvent)
- Notify that the crawler has stopped.
-
timedOut(CrawlEvent)
- Notify that the crawler timed out.
EventLog
public EventLog()
- Make a EventLog that writes to standard output.
EventLog
public EventLog(OutputStream out)
- Make a EventLog that writes to a stream.
EventLog
public EventLog(String filename) throws IOException
- Make a EventLog that writes to a file. The file is overwritten.
- Parameters:
- filename - File to which crawling event messages are written
setOnlyNetworkEvents
public void setOnlyNetworkEvents(boolean flag)
- Set whether logger prints only network-related LinkEvents.
If true, then the logger only prints LinkEvents where
LinkEvent.isNetworkEvent() returns true. If false,
then the logger prints all LinkEvents. Default is true.
- Parameters:
- flag - true iff only network LinkEvents should be logged
getOnlyNetworkEvents
public boolean getOnlyNetworkEvents()
- Test whether logger prints only network-related LinkEvents.
If true, then the logger only prints LinkEvents where
LinkEvent.isNetworkEvent() returns true. If false,
then the logger prints all LinkEvents. Default is true.
- Returns:
- true iff only network LinkEvents are logged
started
public void started(CrawlEvent event)
- Notify that the crawler started.
stopped
public void stopped(CrawlEvent event)
- Notify that the crawler has stopped.
cleared
public void cleared(CrawlEvent event)
- Notify that the crawler's state was cleared.
timedOut
public void timedOut(CrawlEvent event)
- Notify that the crawler timed out.
paused
public void paused(CrawlEvent event)
- Notify that the crawler paused.
crawled
public void crawled(LinkEvent event)
- Notify that a link event occured.
monitor
public static void monitor(Crawler crawler)
- Create a EventLog that prints to standard error and attach it to a crawler.
This is a convenience method.
- Parameters:
- crawler - Crawler to be monitored
All Packages Class Hierarchy This Package Previous Next Index