ibm-messaging / mq-container

Container images for IBM® MQ
Apache License 2.0
255 stars 189 forks source link

MQ 9.2.1.0 r2 image logs #441

Open JakeReise opened 3 years ago

JakeReise commented 3 years ago

Seeing in new image logs there are comment insert lines on every line of the log making it harder to read and may scare apps into raising tickets for non-existent problems. What can be done to have standard output for these logs as with previous version of MQ? in the STS from our previous versions there is a variable set for LOG_FORMAT in the sts in both the old and new version this was defined as default. An example of the output is below.

The listener 'MQLISTENER' has started. ProcessId(141). [ArithInsert1(141), CommentInsert1(MQLISTENER)] 2021-01-29T19:22:15.902Z AMQ5026I: The listener 'SYSTEM.LISTENER.TCP.1' has started. ProcessId(142). [ArithInsert1(142), CommentInsert1(SYSTEM.LISTENER.TCP.1)] 2021-01-29T19:22:15.984Z AMQ5806I: Queued Publish/Subscribe Daemon started for queue manager MI9210. [CommentInsert1(MI9210)] 2021-01-29T19:22:15.985Z AMQ8024I: IBM MQ channel initiator started. [CommentInsert1(SYSTEM.CHANNEL.INITQ)] 2021-01-29T19:22:24.985Z AMQ9218E: The TCP/IP listener program could not bind to port number 1414. [ArithInsert1(1414), ArithInsert2(98), CommentInsert1(bind), CommentInsert2(TCP/IP)] 2021-01-29T19:22:25.025Z AMQ5027I: The listener 'MQLISTENER' has ended. ProcessId(141). [ArithInsert1(141), CommentInsert1(MQLISTENER)]

arthurbarr commented 3 years ago

These inserts were added to ensure that all information which might get inserted into the additional error log information (e.g. the "explanation" section) is available. This is based on feedback we've received about some potential loss of information. The format is consistent with the way this is handled in the MQ Appliance, but I agree it could be nicer. We are considering using a simpler "key=value" format, to be consistent with the Kubernetes logs.

If you want to get rid of it entirely, currently you'd need to edit the code here: https://github.com/ibm-messaging/mq-container/blob/7f85fcf7db2749bfeb314e93cef83f0c506c4812/cmd/runmqserver/logging.go#L66

I'm sceptical that the inserts will cause people to raise tickets, beyond this one. It's worth considering this as a future feature, as an additional LOG_FORMAT value (e.g. basic-message or something)