Mayil-SB-Internal-Prod / loguru-II

MIT License
0 stars 0 forks source link

test I've found on ExceptionFormatter class that it sets a default to 128. I couln't get a clue about some way to set it. ) test #85

Open vikramsubramanian opened 8 months ago

vikramsubramanian commented 8 months ago

I've found on ExceptionFormatter class that it sets a default to 128. I couln't get a clue about some way to set it. )

mayil-ai[bot] commented 8 months ago

Possible Solution

public class ExceptionFormatter {
    private int defaultValue = 128; // Default value for some property

    public ExceptionFormatter() {
        // Constructor code
    }

    public void setDefaultValue(int newValue) {
        this.defaultValue = newValue;
    }
}

Code snippets to check

loguru → _better_exceptions.py This snippet contains the '_format_value' method which handles the formatting of values and includes a 'max_length' variable that could be related to the default value of 128 mentioned in the issue. https://github.com/Mayil-SB-Internal-Prod/loguru-II/blob/dcf42d962567723c0195bb8b2bb6fd764ecf41ae/loguru/_better_exceptions.py#L331-L380 This snippet indicates the location of the 'ExceptionFormatter' class definition. To address the issue, it might be necessary to look at the class definition to understand how the default value is set and how it can be modified. https://github.com/Mayil-SB-Internal-Prod/loguru-II/blob/dcf42d962567723c0195bb8b2bb6fd764ecf41ae/loguru/_better_exceptions.py#L121-L121
loguru → _logger.py This snippet shows the instantiation of the 'ExceptionFormatter' class, which may be where the default value of 128 is set or used. It could be necessary to check if there's a way to pass a different value for the setting that the issue mentions. https://github.com/Mayil-SB-Internal-Prod/loguru-II/blob/dcf42d962567723c0195bb8b2bb6fd764ecf41ae/loguru/_logger.py#L779-L1011