fix: ignore .gen.go suffix in logger to get the real caller when using gen #6785
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What did this pull request do?
When using gen, the logger always print the caller from xxx.gen.go, this is not convenient for user to debug.
![截屏2024-01-08 下午12 55 50](https://private-user-images.githubusercontent.com/13096985/294815023-cb01d51e-1e30-4062-8349-1ba362e42745.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxODA1MzEsIm5iZiI6MTczOTE4MDIzMSwicGF0aCI6Ii8xMzA5Njk4NS8yOTQ4MTUwMjMtY2IwMWQ1MWUtMWUzMC00MDYyLTgzNDktMWJhMzYyZTQyNzQ1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDA5MzcxMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTVjNTdhZGY5MjM4YTc0NWUwOGE2MDU4M2NhNGY4YmJkZDkxNzlhNjBmMzNjYzdkMTVkNTZiZjJhZGVkNmRjMjQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.9DZwDaGtZdJv9BlDr6EHtJu6KNzvOC2gGEFSrU33xS0)
There is an issue also mention this problem #6697.
After ignore this suffix, we can get the real caller in our project from log.
![截屏2024-01-08 下午12 52 55](https://private-user-images.githubusercontent.com/13096985/294814872-37a5e31d-135f-49cb-b6a6-546bd21c8f84.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxODA1MzEsIm5iZiI6MTczOTE4MDIzMSwicGF0aCI6Ii8xMzA5Njk4NS8yOTQ4MTQ4NzItMzdhNWUzMWQtMTM1Zi00OWNiLWI2YTYtNTQ2YmQyMWM4Zjg0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDA5MzcxMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTRjNGQ0ZmJmMTJhMWZhYWI4MjhhZGUxMGQ4YmQwMWYzODU4MWRhOWY4Mzc0M2IyZjRjZjY5NDUwOTFhZmM1ZjImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.JLjifrJNfMUAedzWa0YeP66DgKXuZViC2hVAsZntvdA)