I have added custom level in “log4javascript”. Using below code,
log4javascript.Level[strLevelName] = new log4javascript.Level(nLevelValue, strLevelName);
Let say, i have added level “CUSTLEVEL” and its levelValue is 45000(between WARN & ERROR).
Now, i have set default log level to DEBUG(20000).
When i used “BrowserConsoleAppender”, i am getting all logs of custom log.
But when i used “PopUpAppender”, i am not getting logs of custom log level.
It’s pretty easy to add a custom level to log4javascript but getting the appenders, particularly the
PopUpAppenderandInPageAppender, to deal with them unfortunately requires some fiddling with the source code.If this is important to you then I’ll look into making it easier for version 1.5, if and when I get round to finishing it, although I’ve always found the existing six levels sufficient.