Following the documentation, it should be possible to log from a Foxx service. (looks like this is for an old version and missing in doc for newer versions)
In my script is a console.info("this is a test");
but where does this go and how do I read it?
I cannot find the _foxxlog
collections, not sure where it should be and what user should have access rights. There is a log page in the admin interface of Arango but it is not there.
The documentation reads:
As the log entries are logged to a collection in the database, you can easily query them in your own application.
What collection in what database, and if I look at all of them, there is no logging collection, anywhere.
Update
Found the foxx-manager application, command-line kung-fu, and it has an option development
which is not in the help so it's all a guess.
This didn't work at first but now I added --server.database <mydb>
to it this command executes fine. Still clueless where the log data is.
This updated command:
foxx-manager development --server.database <mydb> <service mount>
gives me the following result:
Activated development mode for
Service undefined version undefined
on mount point /geo
Is this the mount point of my Foxx service? Is this a new point where I should be able to find the log data? Have tried it all, still nothing. Now I log to somewhere I don't know and I activate some mount point somewhere?!
Conclusion
console.info("test");
foxx-manager development --server.database <db> <service mount>
Log into the ArangoDB UI, select your database, and click on the LOGS menu item, you will see the logs listed across the tabs and your logging is in there.
I'm not sure about other ways to access the logs, but I use the LOGS menu.