GSA / notifications-api

The API powering Notify.gov
Other
10 stars 1 forks source link

Look into Werkzeug's documentation and see if there are any tools or improvements we could be leveraging #1276

Open xlorepdarkhelm opened 1 month ago

xlorepdarkhelm commented 1 month ago

Look into Werkzeug's documentation and see if there are any tools or improvements we could be leveraging; for instance, Werkzeug supports colorized log output based on status codes

xlorepdarkhelm commented 1 month ago

Doing a simple search of the documentation, this seems to be the only reference to colored logging:

Colored Logging

The development server highlights the request logs in different colors based on the status code. On Windows, Colorama must be installed as well to enable this.

xlorepdarkhelm commented 1 month ago

It is potentially possible to add simple colors to the loggers when they are output (with escaped ANSI color codes, or getting more advanced with build in tools like ncurses), but I am confident they wouldn't be translatable directly into the cloudwatch logger we use to look at things. We might be able to add some HTML codes into it to colorize, but that's starting to get just plain silly, and I don't even know if that would work.

xlorepdarkhelm commented 1 month ago

The colored logging isn't something intrinsic to the werkzeug library persay, it is something the development server it can run is able to do. And.... it wouldn't be something brought into production (obviously). I'm looking for how to enable it, or if it is jsomething that just is and doesn't actually need any configuration.