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

Only output stomp debug when env var is set

parent 76460208
1 merge request!200Only output stomp debug when env var is set
Pipeline #26967 passed with stages
in 5 minutes and 18 seconds
import { RxStompConfig } from '@stomp/rx-stomp';
import { environment } from './../environments/environment';
export const ARSRxStompConfig: RxStompConfig = {
// Which server?
......@@ -24,6 +25,8 @@ export const ARSRxStompConfig: RxStompConfig = {
// It can be quite verbose, not recommended in production
// Skip this key to stop logging to console
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 = {
name: 'prod',
production: true
production: true,
stomp_debug: true
};
......@@ -5,5 +5,6 @@
export const environment = {
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