Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add brackets around timestamp and log level #1068

Open
wants to merge 1 commit into
base: 5.0
Choose a base branch
from

Conversation

stefano-ottolenghi
Copy link
Contributor

This changes the console logger output from this:

1680156769966 INFO Routing driver 0 created for server address localhost:7687
1680156769969 INFO Routing table is stale for database: "null" and access mode: "READ": RoutingTable[database=default database, expirationTime=0, currentTime=1680156769969, routers=[], readers=[], writers=[]]
1680156769989 INFO Updated routing table RoutingTable[database=neo4j, expirationTime=1680157069987, currentTime=1680156769989, routers=[localhost:7687], readers=[localhost:7687], writers=[localhost:7687]]
The query `MATCH (p:Person {age: $age}) RETURN p.name AS name` returned 0 records in 2 ms.
1680156770005 INFO Driver 0 closing

to this:

[1680158258349] [INFO] Routing driver 0 created for server address localhost:7687
[1680158258352] [INFO] Routing table is stale for database: "null" and access mode: "READ": RoutingTable[database=default database, expirationTime=0, currentTime=1680158258352, routers=[], readers=[], writers=[]]
[1680158258372] [INFO] Updated routing table RoutingTable[database=neo4j, expirationTime=1680158558371, currentTime=1680158258372, routers=[localhost:7687], readers=[localhost:7687], writers=[localhost:7687]]
The query `MATCH (p:Person {age: $age}) RETURN p.name AS name` returned 0 records in 2 ms.
[1680158258392] [INFO] Driver 0 closing

which I personally find easier to parse, and I think is more in line with other logs I've seen.

PS. I also looked into turning the timestamp into a proper date. .toISOString on a new Date(Date.now()) seemed promising, except that js seems unaware of the local timezone so it would become a log of wrong times 🤷‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant