ApifyLogAdapter
Hierarchy
- BaseCrawleeLogger
- ApifyLogAdapter
Index
Constructors
constructor
Parameters
apifyLog: Log
optionaloptions: Partial<CrawleeLoggerOptions>
Returns ApifyLogAdapter
Methods
inheritedchild
Creates a new instance of logger that inherits settings from a parent logger.
Parameters
options: Partial<CrawleeLoggerOptions>
Returns CrawleeLogger
inheriteddebug
Logs a
DEBUGmessage.Parameters
message: string
optionaldata: Record<string, unknown>
Returns void
inheriteddeprecated
Logs given message only once as WARNING for deprecated features.
Parameters
message: string
Returns void
inheritederror
Logs an
ERRORmessage.Parameters
message: string
optionaldata: Record<string, unknown>
Returns void
inheritedexception
Logs an
ERRORlevel message with a nicely formatted exception.Parameters
exception: Error
message: string
optionaldata: Record<string, unknown>
Returns void
inheritedgetOptions
Returns the logger configuration.
Returns CrawleeLoggerOptions
inheritedinfo
Logs an
INFOmessage.Parameters
message: string
optionaldata: Record<string, unknown>
Returns void
logWithLevel
Core logging method. Subclasses must implement this to dispatch log messages to the underlying logger (Winston, Pino, console, etc.).
Level filtering is the responsibility of the underlying library — this method is called for every message regardless of the current level.
Parameters
level: number
Crawlee log level (use LogLevel constants)
message: string
The log message
optionaldata: Record<string, unknown>
Optional structured data to attach to the log entry
Returns void
inheritedperf
Logs a
PERFlevel message for performance tracking.Parameters
message: string
optionaldata: Record<string, unknown>
Returns void
inheritedsetOptions
Configures logger options.
Parameters
options: Partial<CrawleeLoggerOptions>
Returns void
inheritedsoftFail
Logs a
SOFT_FAILlevel message.Parameters
message: string
optionaldata: Record<string, unknown>
Returns void
inheritedwarning
Logs a
WARNINGlevel message.Parameters
message: string
optionaldata: Record<string, unknown>
Returns void
inheritedwarningOnce
Logs a
WARNINGlevel message only once.Parameters
message: string
Returns void
Adapter that wraps
@apify/log's Log instance to implement the CrawleeLogger interface.This is the default logger used by Crawlee when no custom logger is configured. Users who want to use a different logging library should implement BaseCrawleeLogger directly.