Can you write to Bubble log from Server-side plugin?

@Bubble, is there a way to write to the log while developing a server-side plugin?

Well the execution of the action, with the values of the different fields, will be registered in the logs, like any other action that happens server-side.

@Kfawcett and @emmanuel

Did you ever get a suitable answer? I’m converting an Element Action into a Server Side Plugin Action and I’m very accustomed to using console.log to monitor the execution sequence of and variable manipulation within a process. Have you found a way to do this in bubble?

Errors and the returned object (if any) are logged to the console, so that’s a thing.
Apart of that, you can return whatever you want as a variable in the result object and/or send the stringified valued to an API (backend workflow) in Bubble or in requestbin for example.

Happy Bubbling! :smile:

The way I usually handle this is by adding a “log” text return, and have one long log message returned by the plugin… another way to do it would be having a “logs” list of texts so that they’re separate.

Can we see console.log() messages in the server logs? I think maybe when the input to the workflow is really long (e.g. has some long text) I think that the console.log output is not visible - maybe that’s why I thought it was never visible.

Has anyone been able to see server logs? console.log(“PRINT”) does not show up in my logs of a server side plugin I am building.

Yes! It works exactly like this:

You can find more info here, that is just a part of a larger post I wrote :blush:

1 Like

Hey Vinny- I did try that exact code but my server log is entirely empty. Do I need to do something to enable logs to show?

@spencer3
Let’s troubleshoot:
1 - Write “ten minutes ago” at the first field and “now” at the second;
2 - Make sure the other fields, “user email” and “contains” are empty;
3 - Check all boxes in the advanced field;
4 - Press “Search” button again 30 seconds after you run the server side workflow action;
5 - Make sure the test version of the plugin is installed in the app, it will be in the editor URL, something like &test_plugin=1543086664409x454646894723334140_current only that the ID will be different.

Let me know if these helped :yum:
Also, what plan is your app on? You can message me that privately if you want.

3 Likes

@vini_brito, I just wanted to note that I came across your replies in this thread while working on an SSA plugin for the first time in forever and found them very useful! I had sort of forgotten where to go to find console logs from SSAs (turning on the Advanced options is, of course, essential here), and further, I had a derpy bug in some new code and just reading another developer’s troubleshooting steps helped put me in the right frame-of-mind to fix the issue.

2 Likes