1
0
Fork 0
mirror of https://github.com/postmannen/ctrl.git synced 2024-12-14 12:37:31 +00:00

changed the logging of processes

This commit is contained in:
postmannen 2021-06-08 06:02:08 +02:00
parent 2561c1266c
commit c57c2ffc6f
2 changed files with 3 additions and 1 deletions

View file

@ -142,6 +142,8 @@ func (p process) spawnWorker(procs *processes, natsConn *nats.Conn) {
}
processName := processNameGet(p.subject.name(), p.processKind)
// Add prometheus metrics for the process.
p.processes.promProcessesVec.With(prometheus.Labels{"processName": string(processName)})
// Start a publisher worker, which will start a go routine (process)

View file

@ -311,7 +311,7 @@ func (m methodREQOpCommand) handler(proc process, message Message, nodeName stri
procNew := newProcess(proc.natsConn, proc.processes, proc.toRingbufferCh, proc.configuration, sub, proc.errorCh, processKindSubscriber, arg.AllowedNodes, nil)
go procNew.spawnWorker(proc.processes, proc.natsConn)
er := fmt.Errorf("info: startProc: started %v on %v", sub, message.ToNode)
er := fmt.Errorf("info: startProc: started id: %v, subject: %v: node: %v", procNew.processID, sub, message.ToNode)
sendErrorLogMessage(proc.toRingbufferCh, proc.node, er)
case "stopProc":