Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

introduce debug.id helper method #543

Closed
wants to merge 1 commit into from

Commits on Jan 23, 2018

  1. introduce debug.id helper method

    When debugging the applications that work with pools of streams
    or sockets, the debug stream often comes out interleaved making it
    impossible to distinguish between streams. It is a common knowledge
    that unique `id`s could be assigned to each stream and be used in
    logging to solve this. However, this solution is rather ad-hoc and
    usually applied only during manual debugging.
    
    This commit introduces standard function `debug.id()` that
    increments the internal counter only when debugging is enabled, and
    otherwise returns `undefined`.
    indutny committed Jan 23, 2018
    Configuration menu
    Copy the full SHA
    1141cf5 View commit details
    Browse the repository at this point in the history