https://github.com/mvertes/line-trace
Trace print with source filename, function and line numbers
https://github.com/mvertes/line-trace
Last synced: 10 months ago
JSON representation
Trace print with source filename, function and line numbers
- Host: GitHub
- URL: https://github.com/mvertes/line-trace
- Owner: mvertes
- License: mit
- Created: 2015-04-29T13:56:56.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-01-06T14:57:29.000Z (about 10 years ago)
- Last Synced: 2025-02-25T22:44:06.691Z (11 months ago)
- Language: JavaScript
- Size: 7.81 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# line-trace
[](https://travis-ci.org/mvertes/line-trace)
Trace print with process PID, source filename, function and line numbers.
## Install
```
$ npm install line-trace
```
## Usage
```js
var trace = require('line-trace');
function f(a) {
trace(a);
}
f(34);
trace([1, 2, "foo"]);
trace("%s %j", "label", {a:1, b:2});
```
will generate:
```
[125 test.js:4 f] 34
[125 test.js:8 ?] [1,2,"foo"]
[125 test.js:9 ?] label {"a":1,"b":2}
```
## License
[MIT license](./LICENSE).