Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add git branch and commit when log is initialized to help debug #672

Merged
merged 1 commit into from
Oct 19, 2023

Conversation

ademar111190
Copy link
Collaborator

How the log looks like:

[Logger] {FINE} (2023-10-11T12:17:10.440217Z) : Logging initialized, app build on main at commit 06b48d40ed9e7093efb0640ad5846ab61e0e2038

No QA needed

@ademar111190 ademar111190 requested a review from a team October 11, 2023 12:17
@ademar111190 ademar111190 self-assigned this Oct 11, 2023
@JssDWt
Copy link
Contributor

JssDWt commented Oct 11, 2023

Looks like a lot of files are being added to the build just to show the git commit in the logs? What is the size of these .git/** files currently? Would it be possible to simply get the git commit hash during build and put it in a file?

@ademar111190
Copy link
Collaborator Author

@JssDWt it adds less the 100kb (most images we have embedded are bigger)

Creating a file with the exact data we need is much better for sure, but to do it; we need to use some build tool to coordinate the flutter xyz commands, so we can create the file at build time, I don't think that is worth the effort at least for now.

the files being added:

tree --du -h /home/ademar/Downloads/app-debug/assets/flutter_assets/.git
[ 95K]  /home/ademar/Downloads/app-debug/assets/flutter_assets/.git
├── [ 524]  COMMIT_EDITMSG
├── [ 357]  config
├── [  73]  description
├── [ 11K]  FETCH_HEAD
├── [  32]  HEAD
├── [ 74K]  index
├── [  41]  ORIG_HEAD
├── [8.8K]  packed-refs
└── [  59]  refs
    └── [  49]  heads
        └── [  41]  main

  95K used in 3 directories, 9 files

@ademar111190
Copy link
Collaborator Author

Adding this log would help a lot in cases like this: #671 (comment)

Copy link
Contributor

@ubbabeck ubbabeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK

lib/logger.dart Outdated Show resolved Hide resolved
@ademar111190 ademar111190 merged commit 0cff506 into main Oct 19, 2023
@ademar111190 ademar111190 deleted the aa/add-git-info branch October 19, 2023 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants