/**
 * Helper functions for common log query operations
 */
import { createLogQuery } from '../query/query-builder.js';
/**
 * Quick query functions for common use cases
 */
export const logQueries = {
    /**
     * Get all error logs
     */
    errors: (limit) => createLogQuery()
        .levels('error', 'fatal')
        .sortBy('timestamp', 'desc')
        .limit(limit || 100)
        .execute(),
    /**
     * Get logs by correlation ID
     */
    byCorrelation: (correlationId, limit) => createLogQuery()
        .correlationIds(correlationId)
        .sortBy('timestamp', 'asc')
        .limit(limit || 100)
        .execute(),
    /**
     * Get logs by source
     */
    bySource: (source, limit) => createLogQuery()
        .sources(source)
        .sortBy('timestamp', 'desc')
        .limit(limit || 100)
        .execute(),
    /**
     * Get logs with specific tag
     */
    byTag: (tag, limit) => createLogQuery()
        .tags(tag)
        .hasTags()
        .sortBy('timestamp', 'desc')
        .limit(limit || 100)
        .execute(),
    /**
     * Get slow requests
     */
    slowRequests: (minDuration = 1000, limit) => createLogQuery()
        .messageContains('request')
        .durationMin(minDuration)
        .sortBy('duration', 'desc')
        .limit(limit || 50)
        .execute(),
    /**
     * Get memory-intensive operations
     */
    memoryIntensive: (minMemory = 50 * 1024 * 1024, limit) => createLogQuery()
        .memoryThreshold(minMemory)
        .sortBy('memory', 'desc')
        .limit(limit || 50)
        .execute(),
};
//# sourceMappingURL=helpers.js.map