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).


Constructor Index

 o EventLog()
Make a EventLog that writes to standard output.
 o EventLog(OutputStream)
Make a EventLog that writes to a stream.
 o EventLog(String)
Make a EventLog that writes to a file.

Method Index

 o cleared(CrawlEvent)
Notify that the crawler's state was cleared.
 o crawled(LinkEvent)
Notify that a link event occured.
 o getOnlyNetworkEvents()
Test whether logger prints only network-related LinkEvents.
 o monitor(Crawler)
Create a EventLog that prints to standard error and attach it to a crawler.
 o paused(CrawlEvent)
Notify that the crawler paused.
 o setOnlyNetworkEvents(boolean)
Set whether logger prints only network-related LinkEvents.
 o started(CrawlEvent)
Notify that the crawler started.
 o stopped(CrawlEvent)
Notify that the crawler has stopped.
 o timedOut(CrawlEvent)
Notify that the crawler timed out.

Constructors

 o EventLog
 public EventLog()
Make a EventLog that writes to standard output.

 o EventLog
 public EventLog(OutputStream out)
Make a EventLog that writes to a stream.

 o 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

Methods

 o 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
 o 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
 o started
 public void started(CrawlEvent event)
Notify that the crawler started.

 o stopped
 public void stopped(CrawlEvent event)
Notify that the crawler has stopped.

 o cleared
 public void cleared(CrawlEvent event)
Notify that the crawler's state was cleared.

 o timedOut
 public void timedOut(CrawlEvent event)
Notify that the crawler timed out.

 o paused
 public void paused(CrawlEvent event)
Notify that the crawler paused.

 o crawled
 public void crawled(LinkEvent event)
Notify that a link event occured.

 o 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