Logging

Logging

Logging plays a vital role in the development and maintenance of workflows. It allows you to track and understand the flow of your workflow, monitor variable values, monitor total and individual execution time of full workflow and individual nodes,and identify potential issues.

Logging

Logging statements serve as essential tools in your workflow development toolkit. They offer several advantages:

  • Debugging: Logging helps you identify and resolve issues within your workflow's logic.
  • Monitoring: By reviewing log messages, you can monitor the execution flow, identify bottlenecks, and improve efficiency.
  • Data Visualization: Logging enables you to visualize data, making it easier to understand how data changes as the workflow progresses.
  • Track Execution Time: Logging enables you to monitor workflow execution time for individual nodes and the entire workflow and optimize workflows.
  • Organize Group logs by nodes - Logging enables you to easily perform debugging and testing, allowing you to identify and resolve errors efficiently.
  • Mock Requests - Easily test and rerun a request by clicking the test button for each execution (note: headers cannot be accessed for security reasons).
  • LIVE logs for test execution - Get real-time insights into your workflows for a faster debugging experience.

You can harness the power of logging in BuildShip through two primary methods:

Via Logging Core Node

The Logging Core Node provides a straightforward way to log messages and data directly to the BuildShip logging console. Here's how:

Logging Core Node

Add a Node

Click on the "Add a Node" button within your workflow. This will open the Nodeverse Library, where you can explore various nodes.

Find the "Log Message to Console" Node

Within the Core Nodes section, locate the "Log Message to Console" node. You can also use the search bar to quickly find this node.

Insert and Configure the Node

Insert the "Log Message to Console" node into your workflow. Customize the node by adding a string or variable that you want to log.

Via Logging Statements in Node Logic

Another way to integrate logging in your workflow is by directly adding logging statements within the logic of individual nodes. This method gives you more control over when and what to log. Here's how:

Logging Statements

Select and Edit a Logic Node

Choose a Logic Node within your workflow. Open the Node Editor </> to access and edit the node's logic.

Import the Logging Module

Inside the parameters of the node, import the logging module. This allows you to use the logging functions.

export default async function yourNodeFunction({ input }, { logging }) {
  // the function body
  logging.log('This is a logging statement');
  logging.warn('This is a warning message');
  logging.error('This is an error message');
}

Within your node's logic, utilize the logging functions to log messages, variables, and other relevant data.

Viewing the Cloud Logs

After incorporating logging statements into your workflow, you can conveniently view these statements using the built-in logging panel in BuildShip.

Logging Panel
  • The logging panel is located at the bottom of your BuildShip Workspace, initially minimized.
  • You can simply open or close the panel using the expand button on the right to see old logs, if any.
  • To view logs specific to a node or the entire workflow, switch from the default Workflow view to the Node view. To view logs for a particular node, select the node from the Node View.
  • To view LIVE logs for test execution, click on the test button from the workflow test panel and get real-time insights into your workflows for a faster debugging experience, you can also view the logs for each node execution. Note that production logs automatically get populated in the logs panel in ~45 seconds, you can click the refresh icon to load production logs instantly. Live logs
  • To send a mock request, click on the test button for each execution (note: headers cannot be accessed for security reasons). This will help you test and rerun a request easily. Live logs

Need Help?

  • 💬
    Join BuildShip Community

    An active and large community of no-code / low-code builders. Ask questions, share feedback, showcase your project and connect with other BuildShip enthusiasts.

  • 🙋
    Hire a BuildShip Expert

    Need personalized help to build your product fast? Browse and hire from a range of independent freelancers, agencies and builders - all well versed with BuildShip.

  • 🛟
    Send a Support Request

    Got a specific question on your workflows / project or want to report a bug? Send a us a request using the "Support" button directly from your BuildShip Dashboard.

  • ⭐️
    Feature Request

    Something missing in BuildShip for you? Share on the #FeatureRequest channel on Discord. Also browse and cast your votes on other feature requests.