luckyframework / luckyframework/lucky_cli

Log section for test on generated apps isn't very useful

Open
#863 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

hacktoberfest
Dominant language
HTML
Stars
92
Forks
48
PR merge metrics
No merged PRs in 30d

Description

When you generate a new app, you get this section in your `config/log.cr` file

https://github.com/luckyframework/lucky_cli/blob/8344b2749c8cadc560312a4cfc6499275815377c/src/web_app_skeleton/config/log.cr.ecr#L3-L11

This used to be very helpful because back in the day when specs would run, you had a full HTTP server that booted, and you could tail this file to watch the logs and see what was going on. However, that's not the case anymore because booting an HTTP server on spec run is expensive and slow.

This leads to an issue where you run your specs, and you get a 500 error in an action, and tailing this log just looks like this

![image](https://github.com/luckyframework/lucky_cli/assets/2391/5f61b08d-837e-4b15-883c-60a9fff2fb90)

We need to figure out how we can rework this so your queries and errors and everything can go to this file and not STDOUT to the terminal. You should be able to tail this file while running specs and get good information as to what queries your spec is running and what exceptions or errors you're hitting.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/web_app_skeleton/config/log.cr.ecr and compare the generated logging configuration with how specs currently emit queries, exceptions, and errors. Run the generated app's specs and verify that tailing the configured log file shows useful query and error information instead of relying on STDOUT.

Written by the indexing model from the issue text.

Assessment

Tech stack
crystal
Domain
cli, observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.