apoc.log.error

This is the APOC Extended documentation.

APOC Extended is not supported by Neo4j. For the officially supported APOC Core, go to the APOC Core page.

Procedure Apoc Extended

apoc.log.error(message, params) - logs error message

Signature

apoc.log.error(message :: STRING?, params = [] :: LIST? OF ANY?) :: VOID

Input parameters

Name Type Default

message

STRING?

null

params

LIST? OF ANY?

[]

Config parameters

The procedure support the following properties in the APOC configuration file (apoc.conf):

Table 1. Config parameters
name type default description

apoc.user.log.type

String

safe

Type of logging.

  • node: disable the procedures

  • safe: replace all . and whitespace (space and tab) with underscore and lowercase all characters

  • raw: left the messages as-is

apoc.user.log.window.ops

Long

10

Number of log messages permitted in a time-window. If this quota is exceeded, log messags will be skipped.

apoc.user.log.window.time

Long

10000

Length (in milliseconds) of the time-window.

Usage Examples

We can log a message to neo4j.log using the following query:

CALL apoc.log.error('Hello %s', ['World']);
neo4j.log
2020-11-18 10:22:28.923+0000 ERROR hello_world