Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is the level - log or debug? #13

Open
bkardell opened this issue Oct 2, 2013 · 8 comments
Open

What is the level - log or debug? #13

bkardell opened this issue Oct 2, 2013 · 8 comments

Comments

@bkardell
Copy link
Member

bkardell commented Oct 2, 2013

Most of the major browser dev tools have a log level called debug and have filters for this level, however console.log appears to have differences in what it is considered and what filters it responds to. The only one I can find that explicitly mention say that it is a debug level - however, IE console docs state the inverse (debug is an alias for log) and it provides filters based on log not debug.

IE's filters appear to be the most complete in terms of levels - it's just disagreement on what that bottom level is called and perhaps based on filters whether log is unclassified or debug. We should see if we can get agreement by implementers.

Thanks @SebastianZ for pointing that out.

@SebastianZ
Copy link
Contributor

FWIW I am asking the Firebug Working Group about this in our discussion group.

Sebastian

@bkardell
Copy link
Member Author

Sebastian, any further word on this?

@fflorent
Copy link

@SebastianZ
Copy link
Contributor

So the current opinion is to keep log and debug separated. I'll mention it on our conf call on Tuesday again, so we get some conclusion on this.

Sebastian

@SebastianZ
Copy link
Contributor

Our conclusion is to keep log and debug at different levels.
One use case mentioned by Christoph Dorn was that log is used more for temporary logging while debug stays in the code.

Sebastian

@bkardell
Copy link
Member Author

I'm not sure that this is a widely agreed upon intent (I've never thought that, for example)... If it is true, it would imply that there shouldn't be code in live sites using console.log? Where is the conceptual level of "log" in relation to trace/debug? Before trace? after trace but before debug?

@bkardell
Copy link
Member Author

Assume all of these levels have associated constants in native code of increasing numeric value. It, might be informative to look at what level log is re: above question - it's hard to explain in terms of "levels" of logging... Is it maybe just "the null level, always logs regardless".

@SebastianZ
Copy link
Contributor

Assume all of these levels have associated constants in native code of increasing numeric value.

Firebug actually doesn't use any sort of level. It just categorizes the log messages.

If it is true, it would imply that there shouldn't be code in live sites using console.log?

It's of course up to the user whether he uses console.log() or console.debug() in his live sites, though the Firebug Working Group recommends using the latter for this purpose.

Sebastian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants