1

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.

Parth
  • 527
  • 1
  • 8
  • 17

1 Answers1

1

It's pretty easy to add a custom level to log4javascript but getting the appenders, particularly the PopUpAppender and InPageAppender, 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.

Tim Down
  • 318,141
  • 75
  • 454
  • 536
  • thanks for replying. yes, six level is sufficient. but my actual need is, we are making 1 app. now i am add logs in the modules when i am making it, but i don't want that log to logged when module is goes in final build. so , i want to add custom level below our default log level of final build so my log doesn't logged. we set our debug level to "DEBUG" until build goes to production server. – Parth Sep 13 '12 at 15:59