mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Merge pull request #7028 from spalger/implement/consoleLikeLogging
[function tests] console like logging api
This commit is contained in:
commit
187882de57
1 changed files with 5 additions and 4 deletions
|
@ -9,6 +9,7 @@ export default (function () {
|
|||
var _ = require('lodash');
|
||||
var parse = require('url').parse;
|
||||
var format = require('url').format;
|
||||
var util = require('util');
|
||||
var path = require('path');
|
||||
|
||||
function injectTimestampQuery(func, url) {
|
||||
|
@ -223,12 +224,12 @@ export default (function () {
|
|||
return this.tryForTime(defaultFindTimeout, block);
|
||||
},
|
||||
|
||||
log: function log(logString) {
|
||||
console.log(moment().format('HH:mm:ss.SSS') + ': ' + logString);
|
||||
log(...args) {
|
||||
console.log(moment().format('HH:mm:ss.SSS') + ':', util.format(...args));
|
||||
},
|
||||
|
||||
debug: function debug(logString) {
|
||||
if (config.debug) this.log(logString);
|
||||
debug(...args) {
|
||||
if (config.debug) this.log(...args);
|
||||
},
|
||||
|
||||
sleep: function sleep(sleepMilliseconds) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue