Skip to content

process.env.DEBUG variable can have many values #302

Open
@OleksandrKucherenko

Description

@OleksandrKucherenko

Confirm this is a Node library issue and not an underlying OpenAI API issue

  • This is an issue with the Node library

Describe the bug

process.env.DEBUG variable can be used by many libraries, for example: debug npm

more details: https://github.com/debug-js/debug#windows-command-prompt-notes

in other words DEBUG environment variable can be something more complicated than just a true or undefined.

To Reproduce

https://github.com/openai/openai-node/blob/master/src/core.ts#L994-L998

DEBUG=* yarn start:dev
DEBUG=*,-openai  yarn start:dev
DEBUG=openai yarn start:dev

Code snippets

https://github.com/openai/openai-node/blob/master/src/core.ts#L994-L998

 
DEBUG=* yarn start:dev # max verbosity
DEBUG=*,-openai  yarn start:dev # show all debug msgs except openai
DEBUG=openai yarn start:dev # show only openai logs

OS

macOs, Windows, Linux

Node version

any

Library version

4.6.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions