phax / phase4

phase4 - AS4 client and server for integration into existing systems. Specific support for Peppol and CEF eDelivery built-in.
Apache License 2.0
147 stars 48 forks source link

Idea: Add marks to log, so it is easier to read for human #219

Closed Stefan4112 closed 3 months ago

Stefan4112 commented 7 months ago

I would like to suggest something that helped me a lot in OFTP2. The library we use can add marks to make the log file more readable for humans. Simplified example:

[INFO ] ----------  SSID  --------->
[INFO ] do stuff
[INFO ] ----------  SECD  --------->
[INFO ] do stuff
[INFO ] <---------  AUCH  ----------
[INFO ] do stuff
[INFO ] ----------  SFID  --------->
[DEBUG] details of SFID
[INFO ] ----------  EFID  --------->
[INFO ] <---------  EERP  ----------
[INFO ] ----------  ESID  --------->

The long lines makes it easy to find and the arrows show the direction. The example shows the OFTP2 commands (SSID=Start Session; SFID=Start File; EERP="Signal Message", ...). In AS4 it would be nice to find similar parts like Start Session; PMode Found; Send File; Signal Message; Session End and maybe some more.

Do you think this is of general interest and can be implemented in phase4? In the OFTP2 library that log was TRACE, but since we already had to change it for our target platform, I changed it to INFO. It helps a lot to answer questions like "The connection is still open. What happened?".

phax commented 7 months ago

Thanks @Stefan4112 - good suggestion. Let me see what I can do :)

phax commented 5 months ago

Initial parts are contained in 2.7.5 release

phax commented 3 months ago

Closing this for now. If more details are needed, let me know