@@ -38,7 +38,7 @@ import { SocketServer } from "./socket-server";
3838import { DataStream } from "scramjet" ;
3939import { optionsMiddleware } from "./middlewares/options" ;
4040import { corsMiddleware } from "./middlewares/cors" ;
41- import { ConfigService } from "@scramjet/sth-config" ;
41+ import { ConfigService , development } from "@scramjet/sth-config" ;
4242import { isStartSequenceDTO , readJsonFile , defer , FileBuilder } from "@scramjet/utility" ;
4343import { inspect } from "util" ;
4444import { auditMiddleware , logger as auditMiddlewareLogger } from "./middlewares/audit" ;
@@ -63,6 +63,7 @@ const PARALLEL_SEQUENCE_STARTUP = 4;
6363
6464type HostSizes = "xs" | "s" | "m" | "l" | "xl" ;
6565const GigaByte = 1024 << 20 ;
66+ const isDevelopment = development ( ) ;
6667
6768/**
6869 * Host provides functionality to manage Instances and Sequences.
@@ -207,7 +208,7 @@ export class Host implements IComponent {
207208
208209 prettyLog . pipe ( process . stdout ) ;
209210
210- this . logger . info ( "config" , this . config ) ;
211+ if ( isDevelopment ) this . logger . info ( "config" , this . config ) ;
211212
212213 this . config . host . id ||= this . getId ( ) ;
213214 this . logger . updateBaseLog ( { id : this . config . host . id } ) ;
@@ -775,7 +776,7 @@ export class Host implements IComponent {
775776 this . sequenceStore . set ( { id, config, instances : [ ] , name : sequenceName , location : "STH" } ) ;
776777 }
777778
778- this . logger . info ( " Sequence identified" , config ) ;
779+ this . logger . trace ( ` Sequence identified: ${ config . id } ` ) ;
779780
780781 // eslint-disable-next-line max-len
781782 await this . cpmConnector ?. sendSequenceInfo ( id , SequenceMessageCode . SEQUENCE_CREATED , config as unknown as GetSequenceResponse ) ;
@@ -971,7 +972,7 @@ export class Host implements IComponent {
971972 const communicationHandler = new CommunicationHandler ( ) ;
972973 const id = payload . instanceId || IDProvider . generate ( ) ;
973974
974- this . logger . debug ( "CSIC start payload" , payload ) ;
975+ if ( isDevelopment ) this . logger . debug ( "CSIC start payload" , payload ) ;
975976
976977 const csic = new CSIController ( id , sequence , payload , communicationHandler , this . config , this . instanceProxy ) ;
977978
0 commit comments