apoc.log.debug

Procedure APOC Full

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

Signature

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

Input parameters

Name Type Default

message

STRING?

null

params

LIST? OF ANY?

[]

Config parameters

This procedure supports 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.

  • none: disable logging

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

  • raw: leave 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 messages will be skipped.

apoc.user.log.window.time

Long

10000

Length (in milliseconds) of the time-window.

Usage Examples

For this procedure to log messages, we need to set the following config in the Neo4j configuration file:

$NEO4J_HOME/neo4j.conf
dbms.logs.debug.level=DEBUG

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

CALL apoc.log.debug('Hello %s', ['World']);
neo4j.log
CALL apoc.log.debug('Hello %s', ['World']);

We can query the contents of neo4j.log using apoc.log.stream