Messaging

FlexLogs Docs Image

Every application has those moments when you need to send a message out, and it's often trickier than it should be. We've made it simple to get notified when you need it.

Imagine getting important updates right where you want them, whether it's Slack or your email. No more digging through logs or missing crucial events.

Getting Started with Messaging

    
      
  // An example of sending a message to your slack
  logger.info("flexlogs{message: 'slack', content: 'Hello from FlexLogs!'}");

  // Send a message to your email
  logger.info("flexlogs{message: 'email', content: 'Hello from FlexLogs!'}");

    
  

Options

Key Description Type / Options Default
message Where to send the message slack or email or discord none
label A label to prepend to the message String none
content Message body to send String none
channel Channel to send the message for Slack or Discord String none
to Address to send the message for email String none
tags List of tags Array []

Examples

    
      
  // Get notificed of edge cases
  logger.info("flexlogs{message: 'slack', content: 'User used obscure feature'}");

  // Interpolate data to make it more useful
  logger.info("flexlogs{message: 'slack', content: '${user.email} used new feature'}");

  // Stay up to date, like when a new user signs up
  logger.info("flexlogs{message: 'discord', content: 'New user! (${new_user.plan})'}");