{"id":13526116,"url":"https://github.com/mattinsler/longjohn","last_synced_at":"2025-05-15T07:04:15.394Z","repository":{"id":3780113,"uuid":"4857557","full_name":"mattinsler/longjohn","owner":"mattinsler","description":"Long stack traces for node.js inspired by https://github.com/tlrobinson/long-stack-traces","archived":false,"fork":false,"pushed_at":"2019-12-13T17:17:48.000Z","size":63,"stargazers_count":841,"open_issues_count":19,"forks_count":38,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-05-05T08:41:20.233Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mattinsler.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-07-02T08:46:41.000Z","updated_at":"2025-04-28T13:16:53.000Z","dependencies_parsed_at":"2022-08-15T20:21:01.698Z","dependency_job_id":null,"html_url":"https://github.com/mattinsler/longjohn","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattinsler%2Flongjohn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattinsler%2Flongjohn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattinsler%2Flongjohn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattinsler%2Flongjohn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattinsler","download_url":"https://codeload.github.com/mattinsler/longjohn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254292039,"owners_count":22046426,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T06:01:25.427Z","updated_at":"2025-05-15T07:04:15.368Z","avatar_url":"https://github.com/mattinsler.png","language":"CoffeeScript","readme":"# longjohn\n\nLong stack traces for [node.js](http://nodejs.org/) with configurable call trace length\n\n## Inspiration\n\nI wrote this while trying to add [long-stack-traces](https://github.com/tlrobinson/long-stack-traces) to my server and realizing that there were issues with support of [EventEmitter::removeListener](http://nodejs.org/api/events.html#events_emitter_removelistener_event_listener).  The node HTTP Server will begin to leak callbacks and any of your own code that relies on removing listeners would not work as anticipated.\n\nSo what to do...  I stole the code and rewrote it.  I've added support for removeListener along with the ability to cut off the number of async calls the library will trace.  I hope you like it!\n\nPlease thank [tlrobinson](https://github.com/tlrobinson) for the initial implementation!\n\n## Production Use\n\nLongjohn collects a large amount of data in order to provide useful stack traces. While it is very helpful in\ndevelopment and testing environments, it is not recommended to use longjohn in production. The data collection puts\na lot of strain on V8's garbage collector and can greatly slow down heavily-loaded applications.\n\n## Installation\n\nJust npm install it!\n\n```bash\n$ npm install longjohn\n```\n\n## Usage\n\nTo use longjohn, require it in your code (probably in some initialization code).  That's all!\n\n```javascript\nif (process.env.NODE_ENV !== 'production'){\n  require('longjohn');\n}\n\n// ... your code\n```\n\n## Options\n\n#### Limit traced async calls\n\n```javascript\nlongjohn.async_trace_limit = 5;   // defaults to 10\nlongjohn.async_trace_limit = -1;  // unlimited\n```\n\n#### Change callback frame text\n\n```javascript\nlongjohn.empty_frame = 'ASYNC CALLBACK';  // defaults to '---------------------------------------------'\n```\n\n## Use with Source Maps\n\nAs of version 0.2.9 longjonn supports source maps. Just compile your code down to\njavascript with source map support and run like normal.\n\nFor coffee-script, this would look like:\n\n```bash\n$ coffee --map --compile script.coffee\n```\n","funding_links":[],"categories":["CoffeeScript","Packages","包"],"sub_categories":["Debugging / Profiling","Debugging"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattinsler%2Flongjohn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattinsler%2Flongjohn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattinsler%2Flongjohn/lists"}