Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
casperjs
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
913be452
...
913be452b1403b50e211f9d661b68e562fd702e7
authored
2011-10-21 15:30:22 +0200
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
added colored log output
1 parent
80fa8e5c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletions
casper.js
casper.js
View file @
913be45
...
...
@@ -60,6 +60,12 @@
this
.
currentHTTPStatus
=
200
;
this
.
loadInProgress
=
false
;
this
.
logLevels
=
[
"debug"
,
"info"
,
"warning"
,
"error"
];
this
.
logStyles
=
{
debug
:
'INFO'
,
info
:
'PARAMETER'
,
warning
:
'COMMENT'
,
error
:
'ERROR'
};
this
.
options
=
mergeObjects
(
this
.
defaults
,
options
);
this
.
page
=
null
;
this
.
requestUrl
=
'about:blank'
;
...
...
@@ -442,7 +448,8 @@
return
this
;
// skip logging
}
if
(
this
.
options
.
verbose
)
{
this
.
echo
(
'['
+
level
+
'] ['
+
space
+
'] '
+
message
);
// direct output
var
levelStr
=
this
.
colorizer
.
colorize
(
'['
+
level
+
']'
,
this
.
logStyles
[
level
]);
this
.
echo
(
levelStr
+
' ['
+
space
+
'] '
+
message
);
// direct output
}
this
.
result
.
log
.
push
({
level
:
level
,
...
...
Please
register
or
sign in
to post a comment