The dynamic logging allows adding trace points on any line number of a method in the application, third party, and core Java library. The configuration of the trace points will allow you to capture the following data:

- Method Argument
- Local Variable
- Class Member Variable
- Method Return Value
- Capture Stack Trace
- Add Logs in application log file (or agent log file)
- Writes logs to console

## Fully Qualified Class Name

In dynamic logging, you have to first provide the fully qualified class name. To provide the class name, you have to click on the Dynamic Logging icon. Once you click on the icon, the Enter Fully Qualified Class Name For Dynamic Logging dialog box will appear where you have to provide the Fully Qualified Class Name (FQC) along with its path.

#### Notes:

- Once you have entered the class name, you can click on View View button to see the details. You can also close the window by clicking on Cancel Cancel button.
- Once you click on the view button, you can see the trace points for the corresponding class name which you have provided.

## Trace Point

A trace point refers to a specific location or point in a program where log messages or events are captured for debugging or monitoring purposes. When a trace point is encountered in program execution, it triggers the logging mechanism to generate a log message that contains relevant data such as variable values, timestamps, or some contextual information. They are helpful in troubleshooting, performance analysis, or system monitoring scenarios.

Note: You can perform the following operations in the dynamic logging window:

- Edit: To edit the trace point, you have to click on the Edit icon. Once you click on the edit icon, you have to provide the following details which are listed below:
  1. Select Variable to Capture: In this option, you can select any one of the following options:
     - All Method Argument: To pass all the method arguments, select this option.
     - Method Arguments: To pass selected method arguments, select this option. You can either pass a Request or a Response or Both.
     - All Class Fields: To pass all the class fields, select this option.
     - Class Fields: To pass selected class fields, select this option. You can pass multiple class fields.
     - All Local Variables: To pass all the local variables, select this option.
     - Local Variables: To pass selected local variables, select this option. You can pass multiple local variables.

If you want to see the return value for the method, then you have to click on the Method Return Value checkbox.

For log analysis/view which have been captured, you have to click on the Enable Custom Logs radio button. On clicking the button, you have to enter the custom logs inside a “Curly” {} bracket.

1. Select Capture Condition (s): In this option, you can select the condition for capturing the threshold value, along with the track point condition which is met while capturing the data. You have to select the Method Argument or Object Property, or you can select both along with the operation you want to perform and the data type you want to pass such as Variable or Value. You can provide the values by selecting from the respective drop-down or you can also provide a user-defined value. Once you have provided all the values, you have to click on the Add button to add the condition.
2. Configure Tags: In this option, you can configure the tags. To configure the tag, you have to provide the Tag Name along with the Tag Value.

Once you have selected all the parameters, you have to click on the Save Savebutton to save the configuration. If you don’t want to save the configuration, you can click on the Cancel View button.

- Apply on: In this option, you can apply the dynamic logging either on Tier, Current Instance or you can apply on any Select instance of current tier.

Note: In case you choose “Selected Instance on Current Tier” option from the drop-down, you have to select the instance which you want to use from the corresponding Instance drop-down.

- Delete: If you want to delete a trace point, the you have to click on the Delete icon.

#### Notes:

- Once you have provided all the values for the selected parameters, you have to click on Apply Apply button to apply the dynamic logging.
- When you select different trace points on the dynamic logging window, the corresponding method bodies will be displayed alongside them.