Search Results for

    Show / Hide Table of Contents

    Class WebScraper.LogLevel

    Level of WebScraper logging to the Console. Because this Enum is a Flag type options can be combined using a pipe: e.g. LogLevel.Critical | LogLevel.ScrapedData

    Inheritance
    System.Object
    WebScraper.LogLevel
    Namespace: IronWebScraper
    Assembly: IronWebScraper.dll
    Syntax
    public sealed class LogLevel : Enum

    LogLevel sets how much a WebScraper writes to the console, assigned to WebScraper.LoggingLevel. It is a flags enum, so values combine with a pipe. None is silent and All logs everything, while Critical, Http, Decision, and ScrapedData each select one category: errors, HTTP traffic, crawl decisions, and saved data. Combine the categories you want, for example LogLevel.Critical | LogLevel.Http, to keep the console focused during a long crawl. The advanced web scraping tutorial tunes logging on a real crawl.

    scraper.LoggingLevel = LogLevel.Critical | LogLevel.Http;

    Fields

    All

    All events are logged to the console. Extremely verbose;

    Declaration
    public const WebScraper.LogLevel All
    Field Value
    Type Description
    WebScraper.LogLevel

    Critical

    Logs critical events such as permanently irretrievable page failures and system information.

    Declaration
    public const WebScraper.LogLevel Critical
    Field Value
    Type Description
    WebScraper.LogLevel

    Decision

    Logs about decisions made by the crawler.

    Verbose. Useful for advanced debugging.

    Declaration
    public const WebScraper.LogLevel Decision
    Field Value
    Type Description
    WebScraper.LogLevel

    Http

    Logs HTTP request success and failures

    Verbose. Useful for advanced debugging.

    Declaration
    public const WebScraper.LogLevel Http
    Field Value
    Type Description
    WebScraper.LogLevel

    None

    No Logs

    Declaration
    public const WebScraper.LogLevel None
    Field Value
    Type Description
    WebScraper.LogLevel

    ScrapedData

    Logs data which has been extracted, in a JSON format.

    If using YieldUnique, only new records will be logged.

    Will also log File downloads and Images download

    Declaration
    public const WebScraper.LogLevel ScrapedData
    Field Value
    Type Description
    WebScraper.LogLevel

    value__

    Declaration
    public int value__
    Field Value
    Type Description
    System.Int32
    ☀
    ☾
    Downloads
    • Download with Nuget
    • Start for Free
    In This Article
    Back to top
    Install with Nuget