Module: Scrubyt

Defined in:
lib/scrubyt/logging.rb,
lib/scrubyt/output/result.rb,
lib/scrubyt/utils/xpathutils.rb,
lib/scrubyt/output/result_node.rb,
lib/scrubyt/utils/shared_utils.rb,
lib/scrubyt/output/result_dumper.rb,
lib/scrubyt/core/scraping/pattern.rb,
lib/scrubyt/core/shared/extractor.rb,
lib/scrubyt/output/post_processor.rb,
lib/scrubyt/output/scrubyt_result.rb,
lib/scrubyt/core/scraping/constraint.rb,
lib/scrubyt/utils/simple_example_lookup.rb,
lib/scrubyt/core/navigation/fetch_action.rb,
lib/scrubyt/core/scraping/result_indexer.rb,
lib/scrubyt/utils/compound_example_lookup.rb,
lib/scrubyt/core/scraping/compound_example.rb,
lib/scrubyt/core/scraping/constraint_adder.rb,
lib/scrubyt/core/navigation/agents/mechanize.rb,
lib/scrubyt/core/scraping/filters/base_filter.rb,
lib/scrubyt/core/scraping/filters/text_filter.rb,
lib/scrubyt/core/scraping/filters/tree_filter.rb,
lib/scrubyt/core/scraping/pre_filter_document.rb,
lib/scrubyt/core/navigation/navigation_actions.rb,
lib/scrubyt/core/scraping/filters/regexp_filter.rb,
lib/scrubyt/core/scraping/filters/script_filter.rb,
lib/scrubyt/core/scraping/filters/constant_filter.rb,
lib/scrubyt/core/scraping/filters/download_filter.rb,
lib/scrubyt/core/scraping/filters/attribute_filter.rb,
lib/scrubyt/core/scraping/filters/detail_page_filter.rb,
lib/scrubyt/core/scraping/filters/html_subtree_filter.rb

Overview

NOT USED ANY MORE ##########################################

Defined Under Namespace

Modules: FetchAction, Navigation, NavigationActions Classes: AttributeFilter, BaseFilter, CompoundExample, CompoundExampleLookup, ConstantFilter, Constraint, ConstraintAdder, DetailPageFilter, DownloadFilter, Extractor, HtmlSubtreeFilter, Logger, Pattern, PostProcessor, PreFilterDocument, RegexpFilter, Result, ResultDumper, ResultIndexer, ResultNode, ScriptFilter, ScrubytResult, SharedUtils, SimpleExampleLookup, TextFilter, TreeFilter, XPathUtils

Class Method Summary collapse

Class Method Details

.log(level, message) ⇒ Object



88
89
90
91
92
# File 'lib/scrubyt/logging.rb', line 88

def self.log(level, message)
  return if logger.nil?

  logger.log(level, message)
end

.logger=(logger) ⇒ Object

Logging is disabled by default. It can be enabled as follows:

Scrubyt.logger = Scrubyt::Logger.new  # logs *all* messages to STDERR


14
15
16
# File 'lib/scrubyt/logging.rb', line 14

def self.logger=(logger)
  @logger = logger
end