-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #968 from ajaxorg/hotfix/console_updates
Hotfix/console updates
- Loading branch information
Showing
10 changed files
with
806 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
var Util = require("util"); | ||
|
||
var levels = { | ||
"info": ["\033[1m\033[90m", "\033[39m\033[22m"], // grey | ||
"error": ["\033[31m", "\033[39m"], // red | ||
"fatal": ["\033[35m", "\033[39m"], // magenta | ||
"exit": ["\033[36m", "\033[39m"] // cyan | ||
}; | ||
var _slice = Array.prototype.slice; | ||
|
||
|
||
var log = function() { | ||
var args = _slice.call(arguments); | ||
var lastArg = args[args.length - 1]; | ||
|
||
var level = levels[lastArg] ? args.pop() : "info"; | ||
if (!args.length) | ||
return; | ||
|
||
var msg = args.map(function(arg) { | ||
return typeof arg != "string" ? Util.inspect(arg) : arg; | ||
}).join(" "); | ||
var pfx = levels[level][0] + "[" + level + "]" + levels[level][1]; | ||
|
||
msg.split("\n").forEach(function(line) { | ||
console.log(pfx + " " + line); | ||
}); | ||
}; | ||
|
||
log("This is info"); | ||
log("This is error", "error"); | ||
log("This is fatal", "fatal"); | ||
log("This is exit", "exit"); | ||
|
||
console.log(""); | ||
|
||
// classic, additional test: | ||
var T = "gYw"; // The test text | ||
|
||
console.log("\n 40m 41m 42m 43m\ | ||
44m 45m 46m 47m"); | ||
|
||
[' m', ' 1m', ' 30m', '1;30m', ' 31m', '1;31m', ' 32m', '1;32m', ' 33m', | ||
'1;33m', ' 34m', '1;34m', ' 35m', '1;35m', ' 36m', '1;36m', ' 37m', | ||
'1;37m'].forEach(function(FGs) { | ||
var FG = FGs.replace(/[\s\t]+/g, ""); | ||
console.log(" " + FGs + " \033[" + FG + " " + T + " "); | ||
//["40m", "41m", "42m,", "43m", "44m", "45m", "46m", "47m"].forEach(function(BG) { | ||
// console.log("\033[" + FG + "\033[" + BG + " " + T + " \033[0m"); | ||
//}); | ||
}); | ||
|
||
log("<b>" + levels["fatal"][0] + "Lastly:" + levels["fatal"][1] + " some HTML!</b>"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
/** | ||
* This stylesheet is generated automatically, please don't edit manually. | ||
* Generated by iterm2css - http://github.com/mikedeboer/iterm2css | ||
*/ | ||
|
||
.term_ansi0Color { | ||
color: rgb(61, 53, 42); | ||
} | ||
|
||
.term_ansi1Color { | ||
color: rgb(205, 92, 92); | ||
} | ||
|
||
.term_ansi10Color { | ||
color: rgb(136, 170, 34); | ||
} | ||
|
||
.term_ansi11Color { | ||
color: rgb(255, 167, 93); | ||
} | ||
|
||
.term_ansi12Color { | ||
color: rgb(135, 206, 235); | ||
} | ||
|
||
.term_ansi13Color { | ||
color: rgb(153, 102, 0); | ||
} | ||
|
||
.term_ansi14Color { | ||
color: rgb(176, 196, 222); | ||
} | ||
|
||
.term_ansi15Color { | ||
color: rgb(221, 204, 187); | ||
} | ||
|
||
.term_ansi2Color { | ||
color: rgb(134, 175, 128); | ||
} | ||
|
||
.term_ansi3Color { | ||
color: rgb(232, 174, 91); | ||
} | ||
|
||
.term_ansi4Color { | ||
color: rgb(100, 149, 237); | ||
} | ||
|
||
.term_ansi5Color { | ||
color: rgb(222, 184, 135); | ||
} | ||
|
||
.term_ansi6Color { | ||
color: rgb(176, 196, 222); | ||
} | ||
|
||
.term_ansi7Color { | ||
color: rgb(187, 170, 153); | ||
} | ||
|
||
.term_ansi8Color { | ||
color: rgb(85, 68, 68); | ||
} | ||
|
||
.term_ansi9Color { | ||
color: rgb(204, 85, 51); | ||
} | ||
|
||
.term_backgroundColor { | ||
background-color: rgb(28, 28, 28); | ||
} | ||
|
||
.term_boldColor { | ||
color: rgb(255, 255, 255); | ||
} | ||
|
||
.term_cursorColor { | ||
background-color: rgb(226, 187, 239); | ||
} | ||
|
||
.term_cursorTextColor { | ||
background-color: rgb(0, 0, 0); | ||
} | ||
|
||
.term_foregroundColor { | ||
color: rgb(221, 238, 221); | ||
} | ||
|
||
.term_selectedTextColor { | ||
color: rgb(255, 255, 255); | ||
} | ||
|
||
.term_selectionColor { | ||
color: rgb(77, 77, 77); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
/** | ||
* This stylesheet is generated automatically, please don't edit manually. | ||
* Generated by iterm2css - http://github.com/mikedeboer/iterm2css | ||
*/ | ||
|
||
.term_ansi0Color { | ||
color: rgb(56, 56, 56); | ||
} | ||
|
||
.term_ansi1Color { | ||
color: rgb(169, 85, 81); | ||
} | ||
|
||
.term_ansi10Color { | ||
color: rgb(140, 140, 140); | ||
} | ||
|
||
.term_ansi11Color { | ||
color: rgb(169, 145, 117); | ||
} | ||
|
||
.term_ansi12Color { | ||
color: rgb(152, 189, 94); | ||
} | ||
|
||
.term_ansi13Color { | ||
color: rgb(163, 163, 163); | ||
} | ||
|
||
.term_ansi14Color { | ||
color: rgb(220, 220, 220); | ||
} | ||
|
||
.term_ansi15Color { | ||
color: rgb(216, 200, 187); | ||
} | ||
|
||
.term_ansi2Color { | ||
color: rgb(102, 102, 102); | ||
} | ||
|
||
.term_ansi3Color { | ||
color: rgb(169, 128, 81); | ||
} | ||
|
||
.term_ansi4Color { | ||
color: rgb(101, 125, 62); | ||
} | ||
|
||
.term_ansi5Color { | ||
color: rgb(118, 118, 118); | ||
} | ||
|
||
.term_ansi6Color { | ||
color: rgb(201, 201, 201); | ||
} | ||
|
||
.term_ansi7Color { | ||
color: rgb(208, 184, 163); | ||
} | ||
|
||
.term_ansi8Color { | ||
color: rgb(71, 71, 71); | ||
} | ||
|
||
.term_ansi9Color { | ||
color: rgb(169, 119, 117); | ||
} | ||
|
||
.term_backgroundColor { | ||
background-color: rgb(34, 34, 34); | ||
} | ||
|
||
.term_boldColor { | ||
color: rgb(229, 229, 229); | ||
} | ||
|
||
.term_cursorColor { | ||
background-color: rgb(169, 144, 117); | ||
} | ||
|
||
.term_cursorTextColor { | ||
background-color: rgb(0, 0, 0); | ||
} | ||
|
||
.term_foregroundColor { | ||
color: rgb(160, 160, 160); | ||
} | ||
|
||
.term_selectedTextColor { | ||
color: rgb(255, 255, 255); | ||
} | ||
|
||
.term_selectionColor { | ||
color: rgb(77, 77, 77); | ||
} | ||
|
Oops, something went wrong.