Adding logs inside wrapped functions
If there are some very special cases where the first two ways of logging values doesn't work, we have a third and final way of logging parameter values inside functions (endpoint and code blocks).
The general syntax will be
@logger(logger_params)
def your_function(ioc_logger, more_ioc_params, your_params):
special_logger_function(even_more_ioc_params)
<your code>
Since, there are three types of loggers, you can add logs three types of logs.
To add constant logs - ioc_logger.add_constant_logs(log1, log2)
To add endpoint logs - ioc_logger.add_endpoint_logs(endpointlog1)
To add code block logs - ioc_logger.add_code_logs(codelog1)
Note that add_code_logs can be used only inside @log_codepoint wrapped functions.
And it is recommended to use add_endpoint_logs, add_constant_logs inside @log_endpoint wrapped functions.
Email: insightsoncode@gmail.com