Skip to content

Commit

Permalink
filter GET requests
Browse files Browse the repository at this point in the history
  • Loading branch information
gotham13 committed Mar 27, 2024
1 parent d4cb505 commit d9a803f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pm2.launchBus(function (err, bus) {

bus.on("log:out", function (log) {
if (log.process.name !== "PM2-LOGSTASH") {
log.data = log.data.replace('[0m', '')
log.data = log.data.replaceAll('[0m', '').trim()
if (!(log.data.startsWith("/") || log.data.startsWith("GET"))) {
var message = {
timestamp: new Date(log.at).toISOString(),
Expand All @@ -56,7 +56,7 @@ pm2.launchBus(function (err, bus) {

bus.on("log:err", function (log) {
if (log.process.name !== "PM2-LOGSTASH") {
log.data = log.data.replace('[0m', '')
log.data = log.data.replaceAll('[0m', '').trim()
if (!(log.data.startsWith("/") || log.data.startsWith("GET"))) {
var message = {
timestamp: new Date(log.at).toISOString(),
Expand Down

0 comments on commit d9a803f

Please sign in to comment.