How to print something using G4UIMessenger command?

Hello Geant4 experts

I was facing issues while trying to print something using the G4UIMessenger. I have written some messenger code for particle gun so that the gun parameters can be set using a .mac file. The messenger code also has commands to print the current value of those parameters. While the setting part works well (like setting particle type, energy, direction etc.), but the printing cmds do not work. When I call one of those cmds, nothing happens.
I shall be grateful if some guidance is provided for correcting this.

Thanks & regards
Shubham Dutta

Hallo, it should be working in principle. It is difficult to understand the problem provided the information