grassrootsgrocery / admin-portal

GNU Affero General Public License v3.0
10 stars 5 forks source link

Add logging framework, timestamps to server log, & static env variable dev #61

Closed zuechai closed 1 year ago

zuechai commented 1 year ago

For issues #45 & #55

railway-app[bot] commented 1 year ago

This PR is being deployed to Railway 🚅

admin-portal: ◻️ REMOVED

zuechai commented 1 year ago

@mattsahn, looks like I can't initiate an automatic deployment since I don't have access to the Railway project.

mattsahn commented 1 year ago

@zuechai, I just sent an invite to you for Railway for the project to your gmail address. When you get that and signup, try submitting the PR again and see if it then works.

zuechai commented 1 year ago

@mattsahn all set up and deployed on railway now

mattsahn commented 1 year ago

Sweet, love the deployed app for PRs!

Here's what logs look like for the prod app right now (without logging enhancements): image

For the PR branch logs, its not writing anything to STDOUT now, so nothing showing up in logs at all even though I am clicking around in the app: image

@zuechai, Are you seeing the logs show up in your local running instance from this branch? I imagine there's something needed to tell the logger to write to STDOUT that might be missing.

zuechai commented 1 year ago

Yeah, I see it locally. I need to change the conditional for setting the level in the options configuring the logger. Currently, it's set to "warn", but needs to be "info" for production. When I commit that change we should see it working in the next deployment.