log

The log snippet logs its arguments to the console.

You can use the log snippet for testing and debugging. For example, with the log snippet, you can check filter domain syntax and verify that snippets are executed inside content scripts without errors.

The log snippet accepts the same arguments as the console.log() method. For more information, view Mozilla's console.log documentation.

Filter examples

The following table lists examples that use the log snippet:

Filter
Result

log OK

Logs OK to the console.

log Hello, world!

Logs Hello, world! to the console with two parameters.

log `Hello, world!`

Logs Hello, world! to the console with one parameter.

Debugging

In debug mode, the string DEBUG precedes each snippet logged by log.

Last updated