Hi Nikhita,
To read a variable value in your custom Nginx module, follow these steps:
Include the necessary headers: Ensure your module includes the appropriate Nginx headers.
Declare a handler function: Create a function to handle the request and read the variable.
Access the variable: Use ngx_http_get_variable within your handler function to fetch the value of the variable.
Register your handler: Register your handler function with the content phase in your module's configuration.
Module context and directives: Define your module context and directives to properly link your handler.
These steps will allow your custom module to read and use the value of the $level variable set in the Nginx configuration.
Best regards