Logging

This section describes logging features in the Neo4j Graph Data Science library.

In the GDS library there are two types of logging: debug logging and progress logging.

Debug logging provides information about events in the system. For example, when an algorithm computation completes, the amount of memory used and the total runtime may be logged. Exceptional events, when an operation fails to complete normally, are also logged. The debug log information is useful for understanding events in the system, especially when troubleshooting a problem.

Progress logging is performed to track the progress of operations that are expected to take a long time. This includes graph projections, algorithm computation, and result writing.

All log entries are written to the log files configured for the Neo4j database. For more information on configuring Neo4j logs, please refer to the Neo4j Operations Manual.

1. Progress-logging procedure

Progress events may also be tracked by the GDS library itself. This makes it possible to inspect progress via Cypher, in addition to looking in the log files. To enable this feature, the Neo4j configuration must include the entry gds.progress_tracking_enabled=true. When the feature is enabled, a procedure is loaded that can be called to show progress events for currently running tasks.

1.1. Syntax

Getting the progress of tasks:
CALL gds.beta.listProgress()
YIELD
  id,
  taskName,
  message
Results
  • id: generated identifier of the running task.

  • taskName: the name of the running task, i.e. Node2Vec.

  • message: the progress log message, same as what is logged to the debug.log file.

1.2. Examples

Assuming we just started gds.beta.node2vec.stream procedure.

CALL gds.beta.listProgress()
YIELD
  id,
  taskName,
  message
Table 1. Results
id taskName message

"d21bb4ca-e1e9-4a31-a487-42ac8c9c1a0d"

"Node2Vec"

"[gds-1] Node2Vec 42%"