Files
antigravity-skills-reference/skills/apify-actor-development/references/logging.md
Ahmed Rehan 2f55f046b9 feat: add 12 official Apify agent-skills for web scraping & data extraction (#165)
* feat: add 12 official Apify skills for web scraping and data extraction

Add the complete Apify agent-skills collection as official vendor skills,
bringing the total skill count from 954 to 966.

New skills:
- apify-actor-development: Develop, debug, and deploy Apify Actors
- apify-actorization: Convert existing projects into Apify Actors
- apify-audience-analysis: Audience demographics across social platforms
- apify-brand-reputation-monitoring: Track reviews, ratings, and sentiment
- apify-competitor-intelligence: Analyze competitor strategies and pricing
- apify-content-analytics: Track engagement metrics and campaign ROI
- apify-ecommerce: E-commerce data scraping for pricing intelligence
- apify-influencer-discovery: Find and evaluate influencers
- apify-lead-generation: B2B/B2C lead generation from multiple platforms
- apify-market-research: Market conditions and geographic opportunities
- apify-trend-analysis: Discover emerging trends across platforms
- apify-ultimate-scraper: Universal AI-powered web scraper

Existing skill fixes:
- design-orchestration: Add missing description, fix markdown list spacing
- multi-agent-brainstorming: Add missing description, fix markdown list spacing

Registry and documentation updates:
- Update skill count to 966+ across README.md, README.vi.md
- Add Apify to official sources in SOURCES.md and all README variants
- Register new skills in catalog.json, skills_index.json, bundles.json, aliases.json
- Update CATALOG.md category counts (data-ai: 152, infrastructure: 95)

Validation script improvements:
- Raise description length limit from 200 to 1024 characters
- Add empty description validation check
- Apply PEP 8 formatting (line length, spacing, trailing whitespace)

* refactor: truncate skill descriptions in SKILL.md files and revert  description length validation to 200 characters.

* feat: Add `apify-ultimate-scraper` to data-ai and move `apify-lead-generation` from business to general categories.
2026-03-01 10:02:50 +01:00

2.7 KiB

Actor Logging Reference

JavaScript and TypeScript

ALWAYS use the apify/log package for logging - This package contains critical security logic including censoring sensitive data (Apify tokens, API keys, credentials) to prevent accidental exposure in logs.

Available Log Levels in apify/log

The Apify log package provides the following methods for logging:

  • log.debug() - Debug level logs (detailed diagnostic information)
  • log.info() - Info level logs (general informational messages)
  • log.warning() - Warning level logs (warning messages for potentially problematic situations)
  • log.warningOnce() - Warning level logs (same warning message logged only once)
  • log.error() - Error level logs (error messages for failures)
  • log.exception() - Exception level logs (for exceptions with stack traces)
  • log.perf() - Performance level logs (performance metrics and timing information)
  • log.deprecated() - Deprecation level logs (warnings about deprecated code)
  • log.softFail() - Soft failure logs (non-critical failures that don't stop execution, e.g., input validation errors, skipped items)
  • log.internal() - Internal level logs (internal/system messages)

Best Practices

  • Use log.debug() for detailed operation-level diagnostics (inside functions)
  • Use log.info() for general informational messages (API requests, successful operations)
  • Use log.warning() for potentially problematic situations (validation failures, unexpected states)
  • Use log.error() for actual errors and failures
  • Use log.exception() for caught exceptions with stack traces

Python

ALWAYS use Actor.log for logging - This logger contains critical security logic including censoring sensitive data (Apify tokens, API keys, credentials) to prevent accidental exposure in logs.

Available Log Levels

The Apify Actor logger provides the following methods for logging:

  • Actor.log.debug() - Debug level logs (detailed diagnostic information)
  • Actor.log.info() - Info level logs (general informational messages)
  • Actor.log.warning() - Warning level logs (warning messages for potentially problematic situations)
  • Actor.log.error() - Error level logs (error messages for failures)
  • Actor.log.exception() - Exception level logs (for exceptions with stack traces)

Best Practices

  • Use Actor.log.debug() for detailed operation-level diagnostics (inside functions)
  • Use Actor.log.info() for general informational messages (API requests, successful operations)
  • Use Actor.log.warning() for potentially problematic situations (validation failures, unexpected states)
  • Use Actor.log.error() for actual errors and failures
  • Use Actor.log.exception() for caught exceptions with stack traces