how to write to server.out

This is probably something I should know as long as I have been doing Wm but this is the first time I have encountered a need. In the logs directory we have server.out and from a flow service I would like to write to it. I have always used pub.debugLog if I needed to log info but now I need to write to server.out. How from a flow service would I write to server.out? I’m sure it is asynchronous but please verify.
Thanks!

Any idea/answer to this thread please? I would like to know how details are being written to the server.out file. Where is this being configured/setup? Thanks in advance!

Hi,

normally there is no server.out file under IntegrationServer/logs (resp. IntegrationServer/instances/default/logs), only server.log.
Logging to server.log is handled by pub.flow:debugLog, which is described in the IS Built-In-Services Reference.

Writing to System.out is not recommended and should be avoided by any means. If it is really neccessary it will require some custom java coding.

Please provide your wM Version and your OS type and version for further assistance.

Regards,
Holger

Hi Holger,

wM version = 9.0
OS = Linux

How is server.out being generated if it does not normally exists under IntegrationServer/logs? What could have caused server.out to be created automatically?

Thank you.

Hi AJ,

I am only aware of a nohup.out in the IntegrationServer/bin directory when running the IntegrationServer via
“nohup startup.sh &”.
This file represents the console output of the process including logging to System.out (i.e. via println(“sime string”); method) via java services/methods.

Can you provide some sample content of your server.out?
I have never recognized such a file server.out in wM 7.1.x, wM 8.2.x or wM 9.5 SP1.

Regards,
Holger

wM version is 9.0.
Below is a sample of the contents of server.out.

jvm 1 | Logging of error using LogMessage() failed! EXCEPTION (java.lang.NullPointerException)
jvm 1 |
jvm 1 |
jvm 1 | Logging of error using LogMessage() failed! EXCEPTION (java.lang.NullPointerException)
jvm 1 |
jvm 1 |
jvm 1 | Logging of error using LogMessage() failed! EXCEPTION (java.lang.NullPointerException)
jvm 1 |
jvm 1 |
jvm 1 | Logging of error using LogMessage() failed! EXCEPTION (java.lang.NullPointerException)
jvm 1 |
jvm 1 |
jvm 1 | Logging of error using LogMessage() failed! EXCEPTION (java.lang.NullPointerException)

Also, the file size of server.out is larger than the other log files under /IntegrationServer/logs. In one of the IS, server.out is 3.5Mb but the rest of the logs are in Kilobytes only.

Hi AJ,

looks like the wrapper.log of the Tanuki Wrapper.

Regards,
Holger

FYI

Server.out file is the nohup redirection. i.e. for IS 9.0.1, in the startup.sh, redirect the nohup to server.out

{NOHUP} "{BINDIR}/server.sh" * > "{LOGDIR}/server.out" 2>&1

Hi Everyone,

Thank you for your feedbacks.
What could trigger the sudden creation and increase in file size of the server.out if the command “nohup server.sh &” was not ran?

-AJ

Hi AJ,

the nohup command is implicitly executed when running startup.sh for the server instance.

The redirection to server.out seems to be specific for 9.0 as I have never seen this on my 7.1, 9.5 and 9.12 environments.

Regards,
Holger

Hi Holger,

Thank you.
Another thing, is server.out essential? Is it ok to remove the redirection from the startup.sh since the server.log is being updated for every restart done?

Regards,
AJ

Hi AJ,

it is not recommended to modify these part of the startup script.

I have never used 9.0 so I cannot tell much about this.

Regards,
Holger