Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Preconfigured Tracepoint-Specific Logger Operations #23

Open
revelant-doug opened this issue Oct 19, 2020 · 0 comments · May be fixed by #25
Open

Preconfigured Tracepoint-Specific Logger Operations #23

revelant-doug opened this issue Oct 19, 2020 · 0 comments · May be fixed by #25

Comments

@revelant-doug
Copy link
Contributor

Goal: Reduce the changes required by developers when using the logger. This will make the JSON logger easier to use and more importantly easier to use correctly. It will also make the flows that use the JSON logger easier to read and understand without having to view the logger properties.

Approach: Add new JSON Logger operations for each tracepoint each with default settings appropriate to that tracepoint. This will favor convention over configuration. The current fully configurable logger should be left in place so that the JSON logger is still useful when the convention is not appropriate.

These defaults affect three areas, the tracepoint, the priority, and the display name.

For example, to add a “start” logger the developer has to set the TracePoint to START, the priority to INFO, and update the Display Name to “Log start”.

By having an operation named “Log start” with the appropriate defaults, the developer can just drag the logger into the flow with no configuration required.

Other loggers, such as before and after would have a reduced set of options with the defaults as the typical usage.

Finally, message should be optional where the tracepoint provides enough contextual information.

Here are the new operations and their defaults;

Operation       TracePoint         Priority   Message
-------
Log start       START              INFO       Optional
-------
Log end         END                INFO       Optional
-------
Log before      BEFORE_TRANSFORM   INFO       Optional
                * BEFORE_REQUEST   * DEBUG
                                   TRACE
-------
Log after       AFTER_TRANSFORM    INFO       Optional
                * AFTER_REQUEST    * DEBUG
                                   TRACE
-------
Log error       EXCEPTION          ERROR      Required 
-------
Log flow        FLOW               WARN       Required
                                   * INFO
                                   DEBUG
                                   TRACE

NOTE: I had to use “Log error” instead of “Log exception” for the operation name log-exception conflicts with the logException attribute of the on-error element.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant