Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
26 lines (23 loc) · 732 Bytes

File metadata and controls

26 lines (23 loc) · 732 Bytes
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
"use strict";
var VERB=1;
var DBUG=2;
var INFO=3;
var NOTE=4;
var WARN=5;
// FYI: Logging everything is /very/ slow. Chrome will log & buffer
// these console logs even when the debug tools are closed. :(
// TODO: Add an easy UI to change the log level.
// (Developers can just type DEFAULT_LOG_LEVEL=1 in the console)
var DEFAULT_LOG_LEVEL=4;
console.log("Hey developer! Want to see more verbose logging?");
console.log("Type this into the console: DEFAULT_LOG_LEVEL=1");
function log(level, str) {
if (level >= DEFAULT_LOG_LEVEL) {
if (level === WARN) {
// Show warning with a little yellow icon in Chrome.
console.warn(str);
} else {
console.log(str);
}
}
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.