pm2-loggly
v1.1.1
Published
PM2 Remote Logging to Loggly
Downloads
23
Readme
pm2-loggly
Installation
pm2 install pm2-loggly
Configuration
Default Configuration
You can see this inside of package.json
.
"config": {
"logglyClient": {
"token": "your-token",
"subdomain": "your-subdomain",
"tags": "your-tag-1,your-tag-2"
},
"pm2Apps": "your-app-1,your-app-2"
}
Explanation of Configuration Options
logglyClient.token
: a token fromhttps://your-subdomain.loggly.com/tokens
logglyClient.subdomain
: your Loggly subdomainlogglyClient.tags
: a comma-delimited list of global tags applied to all logspm2Apps
: a comma-delimited list of apps allowed to log to Loggly (logs will be tagged with the app name as well)
Recommended Way of Setting the Configuration Options
In your terminal run each of these commands:
pm2 set pm2-loggly.logglyClient.token my-extra-long-token-from-loggly
pm2 set pm2-loggly.logglyClient.subdomain mylogglysubdomain
pm2 set pm2-loggly.logglyClient.tags tag1,tag2,tag3
pm2 set pm2-loggly.pm2Apps app1,app2,app3
Optional Way of Setting the Configuration Options
- Edit
~/.pm2/module_conf.json
and add something like this inside the first{}
:
"pm2-loggly": {
"logglyClient": {
"token": "my-extra-long-token-from-loggly",
"subdomain": "mylogglysubdomain",
"tags": "tag1,tag2,tag3"
},
"pm2Apps": "app1,app2,app3"
}
- Edit
pm2-loggly/package.json
and replace the default configuration above with:
"config": {
"logglyClient": {
"token": "my-extra-long-token-from-loggly",
"subdomain": "mylogglysubdomain",
"tags": "tag1,tag2,tag3"
},
"pm2Apps": "app1,app2,app3"
}