.

Harvest::Debug - static debugging control

DESCRIPTION

This package provides a debugging system for all of the Harvest modules.

It is designed to be used in a static context (b<not> as an object), and provides global control of debugging through the use of tags. The user can set a list of tags for which debugging is allowed, and the programmer can use these by calling the Harvest::Debug::ok($tag) function.

TAGS

The following debugging tags are permitted

Reaper progress

The tags below indicate the actions of the overall reaping process

Init
Reports on the initialisation of sections of the code
Add
Reports on URLs being added to the workload, and on redirections being carried out.
Filter
Reports on URLs being rejected by filters in the fetching process
Fetch
Indicates when a request for a URL is being initiated
Summarise
Details of the summarisation process being performed on the object
Store
Indicates when a URL is being stored back into the database

Specific sections and modules

The following tags are used by specific modules or sections of the code

RunProg
Reports on the activity of the RunProg summariser
ClientServer
Provides diagnostics about the running of the Client/Server process model.
RobotsTxt
Provide information about robots.txt file fetching and analysis.
URLregex
Provide information about URLregex and HostList behaviour

FUNCTIONS

Harvest::Debug::ok($tag [,$level])

Check to see if its OK to print a debug message of a given level, for a given tag. If $level is not set, it is assumed to be 0.

Harvest::Debug::add($tag [,$level])

Add debugging with a given tag, at a given level. Will die (throw an exception) if the given tag isn't allowed.