import { IS_APIFY_LOGGER_EXCEPTION, LogFormat } from './log_consts.js'; /** * Ensures a string is shorter than a specified number of character, and truncates it if not, appending a specific suffix to it. * (copied from utilities package so logger do not have to depend on all of its dependencies) */ export declare function truncate(str: string, maxLength: number, suffix?: string): string; /** * Gets log level from env variable. Both integers and strings (WARNING) are supported. */ export declare function getLevelFromEnv(): number; /** * Gets log format from env variable. Currently, values 'JSON' and 'TEXT' are supported. * Defaults to 'TEXT' if no value is specified. */ export declare function getFormatFromEnv(): LogFormat; type SanitizeDataOptions = { maxDepth?: number; gradualLimitFactor?: number; maxStringLength?: number; maxArrayLength?: number; maxFields?: number; preferredFieldsMap?: Record; truncationSuffix?: string; truncationFlagKey?: string; }; /** * Sanitizes given object based on the given options. * * ie. Replaces object's content by '[object]' and array's content * by '[array]' when the value is nested more than given depth limit. */ export declare function sanitizeData(data: unknown, options: SanitizeDataOptions): unknown; export interface LimitedError { [IS_APIFY_LOGGER_EXCEPTION]: true; name: string; message: string; stack?: string; cause?: unknown; type?: string; details?: Record; reason?: string; [key: string]: unknown; } export {};