Skip to main content
🚀 Self Healing AI Agent now live in App Automate! Auto-fix flaky tests instantly with zero code changes. Enable now!
No Result Found
Connect & Get help from fellow developers on our Discord community. Ask the CommunityAsk the Community

Configure a custom log directory in NodeJS

How do I load environment variables from a .env file in NodeJS?

You can configure a custom log directory to avoid conflicts during parallel SDK builds. By default, BrowserStack SDK stores logs in a static directory, which can cause issues with concurrent builds. Use one of these methods to set a custom log directory:

Command Line Argument:

--browserstack.logDir <path>


Environment Variable:

BROWSERSTACK_LOG_DIR=<path>


Config File: Add the following parameter to your browserstack.yml file:

logDir: <path>


You cannot customize individual file paths or names within the directory. This feature is supported only for Node.js.

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback!

Talk to an Expert
Download Copy Check Circle