Skip to content
This repository has been archived by the owner on Aug 4, 2023. It is now read-only.
/ slack-log Public archive

Simple util to log messages to Slack - slack.log()

License

Notifications You must be signed in to change notification settings

nileshr/slack-log

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📝 slack.log()

Simple util to log messages to Slack - slack.log()

Configure

  • Simply put a slack incoming webhook url in SLACK_WEBHOOK_URL environment variable (Recommended).
  • Can also configure by using slack.configure({url: 'SLACK_URL_HERE'}).
  • Can also override the slack channel (optional) the webhook posts to, by using SLACK_CHANNEL env variable or by passing channel field to slack.configure() method.

Usage

  • Simply use like a console.log statement - slack.log("Yay! It works")
  • Can also post an object in the second variable which gets formatted and posted as a code block (useful for logging data). For example, slack.log('HELLO!', {first_name: 'john', last_name: 'doe'})

About

Simple util to log messages to Slack - slack.log()

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published