function log(){
var time = getTimestamp();
process.stdout.write(time + ' ');
console.log.apply(console, arguments);
return this;
}n/a
function dir(){
var time = getTimestamp();
process.stdout.write(time + ' ');
console.dir.apply(console, arguments);
return this;
}...
### `log.info(msg...)`
Logs the message as if you called `console.info` but prefixes the output with the
current time in HH:MM:ss format.
### `log.dir(msg...)`
Logs the message as if you called `console.dir` but prefixes the output with the
current time in HH:MM:ss format.
## License
MIT
...function error(){
var time = getTimestamp();
process.stderr.write(time + ' ');
console.error.apply(console, arguments);
return this;
}...
```js
var log = require('fancy-log');
log('a message');
// [16:27:02] a message
log.error('oh no!');
// [16:27:02] oh no!
```
## API
### `log(msg...)`
...function info(){
var time = getTimestamp();
process.stdout.write(time + ' ');
console.info.apply(console, arguments);
return this;
}...
### `log.warn(msg...)`
Logs the message as if you called `console.warn` but prefixes the output with the
current time in HH:MM:ss format.
### `log.info(msg...)`
Logs the message as if you called `console.info` but prefixes the output with the
current time in HH:MM:ss format.
### `log.dir(msg...)`
Logs the message as if you called `console.dir` but prefixes the output with the
...function warn(){
var time = getTimestamp();
process.stderr.write(time + ' ');
console.warn.apply(console, arguments);
return this;
}...
current time in HH:MM:ss format.
### `log.error(msg...)`
Logs the message as if you called `console.error` but prefixes the output with the
current time in HH:MM:ss format.
### `log.warn(msg...)`
Logs the message as if you called `console.warn` but prefixes the output with the
current time in HH:MM:ss format.
### `log.info(msg...)`
...