cheatcode / joystick

A full-stack JavaScript framework for building stable, easy-to-maintain apps and websites.
https://cheatcode.co/joystick
Other
202 stars 10 forks source link

Add a joystick.log_in_development() function #341

Open rglover opened 9 months ago

rglover commented 9 months ago

This would be really handy. Logs are essential for development, but we don't want them in non-development environments. It'd be helpful to have a function that automates this like so:

import joystick from '@joystick.js/node';

joystick.log_in_development('something to log');

This would just be a wrapper with an env check around the native console.log().

rglover commented 9 months ago

Could also add joystick.log_in_staging() and joystick.log_in_production() as those things can happen for information beyond debugging.

rglover commented 9 months ago

All of the above may be good candidates for addition to #49.