Hi
I have a lot of frustration with regards to the logging of FB as very often the logs are unhelpful and difficult to use.
My suggestion would be to change the logging mechanism from changing the ‘capture’ mode (start / steps / stops) to capturing all always and having a filter instead.
The logic about this is you do not need log files until something goes wrong and you (generally) cannot tell when something is going to go wrong. You only need the detail when the detail is needed, apart from that, high level detail is fine.
My suggestion would be to follow the standard that the tech industry uses
# | Log Level | Importance |
---|---|---|
0 | Fatal | One or more key business functionalities are not working and the whole system doesn’t fulfill the business functionalities. |
1 | Error | One or more functionalities are not working, preventing some functionalities from working correctly. |
2 | Warn | Unexpected behavior happened inside the application, but it is continuing its work and the key business features are operating as expected. |
3 | Info | An event happened, the event is purely informative and can be ignored during normal operations. |
4 | Debug | A log level used for events considered to be useful during software debugging when more granular information is needed. |
5 | Trace | A log level describing events showing step by step execution of your code that can be ignored during the standard operation, but may be useful during extended debugging sessions. |
Level 0 - Things like e-stop or other fatal type of messages
Level 1 - Dropped steps / Failed UTM connections etc
Level 2 - Retries of missed steps
Level 3 - Sequence start / stop / other information script generated message
Level 4 - Every step in a sequence
Level 5 - Every step, response and very low-level messaging
The issue is that this will create large log files which is problematic to handle so I would suggest this are the resolution around it.
1 - Create two log files. One is synced automatically and the other is local unless requested for analysis
a - Synced log file will cover Level 0 to 3 only
b - All levels - Only synced on MANUAL request for diagnostic.
On request, the user can request a detailed log file to be uploaded to the mothership and can then read the detail.
The benefit to the mothership in standard operations is a reduced log level
The benefit to the user is access to low level low files on demand and logging events are not lost because they were not asked for before they knew they needed them.