LogoLogo
Enterprise GuideCommunity Edition GuideDeveloper Guide
  • Using The Polarity Developer Guide
  • Quick Start
    • What's New
    • Installing Integrations
    • Quick Start Guide
    • Learning Resources
  • Building an Integration
    • Directory Layout
    • package.json
    • Configuration File
    • Integration Main Module
      • startup
      • doLookup
        • Entity Objects
        • Result Objects
        • Error Objects
      • onDetails
      • onMessage
      • validateOptions
    • Customizing the Overlay Window
      • Templates
        • Conditionals
        • Displaying a List of Items
        • Display Object Properties
        • Built-in Helpers
        • Displaying Icons
      • Component File
        • Aliased Properties
        • Computed Properties
        • Event Hooks
      • CSS Styles
    • Vendor Javascript
      • Inserting Javascript into DOM
    • README Guide
    • Debugging Integrations
      • Web Inspector
      • Using Integration Logs
      • Testing Main Module
  • Recipes
    • Enabling User Actions
    • Throttling Lookups
    • Using Custom Entity Types
    • Custom Summary Tags
    • Creating a Tabbed Interface
    • Accessing Username of Requestor
Powered by GitBook
On this page
  1. Building an Integration
  2. Debugging Integrations

Using Integration Logs

Logging information from your integration is a great way to debug.

PreviousWeb InspectorNextTesting Main Module

Last updated 3 years ago

One method for debugging your integrations is to make use of the passed in through the startup method of the main module to log what your integration is doing.

You can then navigate to the log directory for your integration which defaults to logs/integration.log to tail and follow the file.

tail -f integration.log

You'll notice that the logs produced are in JSON making them difficult to read. You can use the Bunyan logger module to format them for you.

tail -f integration.log | /app/polarity-server/node_modules/bunyan/bin/bunyan -o short

If this is your first time using bunyan you will need to make it executable with the following command:

chmod a+x /app/polarity-server/node_modules/bunyan/bin/bunyan
Logger object