stevegrunwell / lost-in-translation

Uncover missing translations and localization strings in Laravel applications.
https://stevegrunwell.com/blog/find-missing-laravel-translations/
MIT License
36 stars 8 forks source link

Fix/monolog use files #5

Open stevegrunwell opened 6 years ago

stevegrunwell commented 6 years ago

Version 1.0.0 of Lost in Translation doesn't appear to properly write log files: when using it in testing an actual application, two things happen:

  1. Errors are sent to both the laravel.log as well as lost-in-translation.log files, which is redundant.
  2. Tests will fail with Error: Call to undefined method Monolog\Logger::useFiles().

This PR establishes an actual "lost-in-translation" logging channel (dynamically at runtime after a missing translation is found, unless the user sets it up in their config/logging.php file), as well as actually verifies against the filesystem that the log was written.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling c118229c923fffd0dce8510f57a7817edffe4e1a on fix/monolog-use-files into 4fb656bad99e313375969117de566c8c859fbbb4 on develop.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 98e7523af978f0d3093b62134cfb0988a10a376e on fix/monolog-use-files into 4fb656bad99e313375969117de566c8c859fbbb4 on develop.

nickbryan commented 6 years ago

Any chance of this getting merged soon?

stevegrunwell commented 6 years ago

I'm currently dog-fooding this package on a client application, and have been running into issues with logs not saving properly — once I'm able to spend the time ensuring everything works properly, it'll be ready for merge + a fresh release.

mbardelmeijer commented 5 years ago

Any update on this PR? Would love to use this package for a project but running in into this issue with Laravel 5.7. If i can help out in any way let me know.

q-- commented 2 years ago

For people who want to use this specific branch with the fix as it's not merged, you can install it with composer require "stevegrunwell/lost-in-translation:dev-fix/monolog-use-files"

You might have to composer remove the old version first.