Skip to content

[Feature Request]: Missing getLogFilter helper for applying advanced log filters #5848

@ivodolenc

Description

@ivodolenc

What problem does this feature solve?

Hi, it seems that the getLogFilter helper function is missing in Rolldown.

Official docs from Rollup.

What does the proposed API look like?

Same as Rollup existing API:

// rollup.config.mjs
import { getLogFilter } from 'rollup/getLogFilter';

const logFilter = getLogFilter(['code:FOO', 'code:BAR']);

export default {
	input: 'main.js',
	output: { format: 'es' },
	onLog(level, log, handler) {
		if (logFilter(log)) {
			handler(level, log);
		}
	}
};

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions