Skip to content

Commit

Permalink
logging was improved and delete deprecated GA
Browse files Browse the repository at this point in the history
  • Loading branch information
Sonmezturk committed Aug 3, 2023
1 parent 867d575 commit a153129
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 41 deletions.
20 changes: 0 additions & 20 deletions .github/workflows/trigger-production-deployment.yml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/workflows/trigger-qa-deployment.yml

This file was deleted.

2 changes: 2 additions & 0 deletions src/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const {
HOST = '127.0.0.1',
PORT = 3002,
APP_ENV,
NODE_ENV,
SLACK_WEBHOOK_URL,
SLACK_LOGGING,
LOGSTASH_PORT,
Expand Down Expand Up @@ -39,6 +40,7 @@ const config = {
HOST,
PORT,
APP_ENV,
NODE_ENV,
LOGSTASH_HOST,
LOGSTASH_PORT,
LOGSTASH_INDEX,
Expand Down
4 changes: 3 additions & 1 deletion src/util/logger/appenders/logstashAppender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@ interface IMessage {
interface ILogstashMessage {
'@timestamp': string;
'@metadata': { package: string };
Env: string;
Message: string;
Stack: string;
Detail: string;
Endpoint: string;
Host: string;
Level: string;
}
const { LOGSTASH_HOST, LOGSTASH_PORT, LOGSTASH_INDEX } = config;
const { NODE_ENV, LOGSTASH_HOST, LOGSTASH_PORT, LOGSTASH_INDEX } = config;

function generatePayload(loggingEvent: ILoggingEvent): ILogstashMessage {
const {
Expand All @@ -43,6 +44,7 @@ function generatePayload(loggingEvent: ILoggingEvent): ILogstashMessage {
'@metadata': {
package: LOGSTASH_INDEX,
},
Env: NODE_ENV,
Message: message,
Stack: stack,
Detail: detail,
Expand Down

0 comments on commit a153129

Please sign in to comment.