Skip to content
Snippets Groups Projects
Commit 704e5e45 authored by Tom Käsler's avatar Tom Käsler
Browse files

Merge branch 'remove-stomp-debug-in-prod' into 'master'

Only output stomp debug when env var is set

See merge request !200
parents 76460208 54bac540
1 merge request!200Only output stomp debug when env var is set
Pipeline #26968 passed with stages
in 5 minutes and 17 seconds
import { RxStompConfig } from '@stomp/rx-stomp'; import { RxStompConfig } from '@stomp/rx-stomp';
import { environment } from './../environments/environment';
export const ARSRxStompConfig: RxStompConfig = { export const ARSRxStompConfig: RxStompConfig = {
// Which server? // Which server?
...@@ -24,6 +25,8 @@ export const ARSRxStompConfig: RxStompConfig = { ...@@ -24,6 +25,8 @@ export const ARSRxStompConfig: RxStompConfig = {
// It can be quite verbose, not recommended in production // It can be quite verbose, not recommended in production
// Skip this key to stop logging to console // Skip this key to stop logging to console
debug: (msg: string): void => { debug: (msg: string): void => {
console.log(new Date(), 'STOMP debug: ' + msg); if (environment.stomp_debug) {
console.log(new Date(), 'STOMP debug: ' + msg);
}
} }
}; };
export const environment = { export const environment = {
name: 'prod', name: 'prod',
production: true production: true,
stomp_debug: true
}; };
...@@ -5,5 +5,6 @@ ...@@ -5,5 +5,6 @@
export const environment = { export const environment = {
name: 'dev', name: 'dev',
production: false production: false,
stomp_debug: true
}; };
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment