I am modifying room.js in this location:
./app/ui/client/views/app/room.js
Please note that I am modifying rocketchat 3.10.0, which is a version of rocketchat which used meteor.
I am having trouble running a simple:
console.log(“hello”);
However, this command is running fine in the same script:
Template.room.events({
“click #payNow”: function () {
FlowRouter.go(/payNow);
},
});
Why might console.log not work? It seems like there may be some setting on the backend of rocketchat which is stopping anything from logging to my console, as I have tested this with another meteor project and it works totally fine.
Does anyone have any suggestions? Even a workaround would be great.
You should always avoid changing Rocket.Chat core code. have you evaluated if you can create, instead, a Rocket.Chat App?
regarding your question, the console.log, as it’s running on client, should be shown in the browser, not in the server logs.
Also, try using the proper logging mechanisms, instead of pure console.log. After some version, all logs became json (for the sake of easier log monitoring).
I have been trying to modify a few things about rocket.chat, and I did not know that the logs became JSON. Even when I console.log data from the client, it does not appear in the browser, so I assume that it is also being logged as JSON.
Do you know where I can find the JSON file with the logs? If you don’t know the specific location of the JSON file, do you know what the file is called so I can search for it within my Rocket.Chat application?