Problems with log on application server with operating-mode

Posted by Kai Siegele on 23-May-2017 08:58

Hallo,

I am writing an application calling  a procedure on an application server asynchronous. This procedure updates a record in the database and writes an entry into the log-file of application server to document this action. The log-entry is very important. We use this entry to show our customers that an action has performed if they are in doubt

For this purpose I have created an application server with operating mode state-free.

In my client program I have connected the application server.

On application server I have executed the  procredure using keyword ASYNCHRONOUS and specifying a procedure to call back after execution.

Everything works fine: The record in the database were all updated. The procedure was called back for each call. Unfortunately not all entries in the log-file were written.

Has anyone an idea what could be the reason of my problem?

Kind regards

Kai Siegele

All Replies

Posted by Peter Judge on 23-May-2017 09:02
How are you writing entries to the log?
Posted by Brian K. Maher on 23-May-2017 09:02
What are you using async?
 
Posted by Kai Siegele on 23-May-2017 09:09

Hallo Peter,

that's the line to fill the log:

LOG-MANAGER:WRITE-MESSAGE(SUBSTITUTE("FindAllTransaction(&1) => &2", STRING(transactionNumber, "999999"), resultMessage)).

Kind regards

Kai

Posted by Kai Siegele on 23-May-2017 09:13

Hallo Brian,

thanks for your reply, but I have not understood your question. The full Statement of invoking procedure on application Server is:

RUN c:\pro11\apl\wuc\findtransaction.p ON hAppSrv ASYNCHRONOUS SET hCallbackProcedure EVENT-PROCEDURE "StoreFindResult" IN this-procedure (INPUT transactionStatus, INPUT counter, OUTPUT result) .

Does it answer your question?

Kind regards

Kai

Posted by Peter Judge on 23-May-2017 09:20

Kai,

Are you calling the log-manager on the server (it's not clear)? If so, the WRITE-MESSAGE() statement should work, and should write immediately. If it doesn't then you should contact Tech Support.

Also, you don't have to use STRING inside a SUBSTITUTE() statement if you don't want to. The SUBSTITUTE function takes all types (including unknown values) and converts/prints them nicely.

Posted by Kai Siegele on 23-May-2017 09:47

Hallo Peter,

thanks for your answer and the tip with the Substitute method.

Indeed it's the log-Manager on the Server. This one I see when invoking fathom in ie and invoking "Log file Viewer of Server" for the aplication Server.

Kind regards

JKai

Posted by Peter Judge on 23-May-2017 10:02
One other thing (and it’s the equivalent of “reboot windows”) … are you looking in the right file? On AppServers you cannot change the filename, so you will always write to <appserver-name>.server.log .
 
Posted by Stefan Drissen on 23-May-2017 10:15

[quote user="Peter Judge"]

Also, you don't have to use STRING inside a SUBSTITUTE() statement if you don't want to. The SUBSTITUTE function takes all types (including unknown values) and converts/prints them nicely.

[/quote]The string is being formatted with leading zeroes which substitute will not do by itself.

Posted by Peter Judge on 23-May-2017 10:20
Yep. That’d be a nice enhancement … &1:>>>>>9 . Though we’d be inventing printf :)
 
This thread is closed