Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Brunch set LOGGY_STACKS=true

I am developing an app with brunch. I am new to it and to trace an error I have to enable LOGGY_STACKS=true. How can I set it up?

Stack trace was suppressed. Run with `LOGGY_STACKS=true` to see the trace.
like image 604
solracid Avatar asked Jun 07 '16 09:06

solracid


2 Answers

If you're on Windows, there's a few ways to go about setting this in your System Environment variables. The way to find it via your System / Computer properties is:

  • On your desktop, right-click "Computer", then click "Properties".
  • Click "Advanced system settings" (see image).

enter image description here

  • In the System Properties dialog, click the Advanced tab and click the Environment Variables... button.

  • Once there, under the first section where it says "User variables for YOUR_USER_NAME", click New and add LOGGY_STACKS as the name and true as the value.

enter image description here

  • OK your way out of those windows / panels, close any command-line windows you had open to run brunch, re-open and try it out now.

It should give you lengthier stack-traces; hopefully it'll help you narrow down your issue in your configuration.

like image 190
chamberlainpi Avatar answered Nov 01 '22 17:11

chamberlainpi


If you're not keen on "permanently" modifying your system environment vars and affecting other Brunch based projects, you can use the set command within your NPM scripts definition in package.json, followed by a && combinator and the brunch command.

This technique should work on both Unix and Windows machines.

// example package.json
{
  "scripts": {
    "start": "set LOGGY_STACKS=true && brunch watch --server",
    "serve": "npm run start",
    "build": "brunch b -p --env production",
    "clean": "rm -rf public dist"
  }
}

For reference, I use start and stop to cover my bases as not all NPM based services use the same initialization task names.

like image 2
bmcminn Avatar answered Nov 01 '22 18:11

bmcminn