
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
A tool for logging and debugging important events in your app that a developer should be able to easily be notified about and look into.
A simple module for logging and alerting about spesific critical events inside your app for further inspection by a developer.
Writes log messages to std.out or std.err.
Supports notifying a Slack channel (fully optional).
Logdog is not meant to be your application logger or debugger! It's a tool for logging spesific events in your app, and let someone know about it (it may not even be a developer). Logdog's barks let you know something is wrong without looking at exceptions, stacktraces and stuff like that. It's a call to actions for further debugging / log file inspection by a developer.
npm install logdog
Logdog is first initialized in your app by requiring it and passing configuration options for it:
var logDog = require('logdog')(...config);
Next time you require it, you will get the singleton instance of the first require, so you don't need to configure Logdog all over the place.
Another place in the code (call without any options):
var logDog = require('logdog')();
Logdog is now configured with options from the first initial require statement.
logDog('myApp.myFeature').bark('Winter is coming!');
The function parameter to logDog is the prefix for the log line, indicating where in the application/script the event occurred.
Then we call .bark(message) to assign the actual log message.
If we want, we may put it on Slack too:
logDog('myApp.myFeature').bark('Winter is coming!').toSlack({notify: '@jon'});
prefix
String to prefix any log messages with. Default is logdog.
bindTo
By default Logdog.bark goes to sdt.err. Value stdout will bind it to std.out. Value null will disable any output (i.e. for only sending to slack).
slack
The slack property is a hash of the following keys:
url: Required. I.e. 'https://hooks.slack.com/services/XXX/YYY/abc'channel: Required. I.e. '#appNotifications'username: Optional. Defaults to 'LogDog'.emoji: Optional. An emoticon associated with the message. Defaults to ':dog:',notify: Optional. Slack username(s) to notify. I.e. '@jon' or ['@jon', '@samwell']. var logDog = require('logdog')();
logDog('myapp.myfeature').bark("Something went so wrong!");
var logDog = require('logdog')({bindToStdOut: true});
logDog('myapp.myfeature').bark("Did something of importance!");
var logDog = require('logdog')({
slack: {
url: 'https://hooks.slack.com/services/XXX/YYY/abc',
channel: '#appNotifications'
}
});
logDog('myapp.myfeature')
.bark("Did something of importance!")
.toSlack()
logDog('myapp.myfeature')
.bark("Something went horribly wrong!")
.toSlack({emoji: ':heavy_exclamation_mark:', notify: '@myusername'})
FAQs
A tool for logging and debugging important events in your app that a developer should be able to easily be notified about and look into.
We found that logdog demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.