diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f1d217..a08b28a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ ## Unreleased [Compare]: https://github.com/shakacode/cypress-on-rails/compare/v1.10.1...main +### Changed +* alternative command added for get tail of logs [PR 89](https://github.com/shakacode/cypress-on-rails/pull/89) by [ccrockett] + ### Tasks * switch from travis to github actions [PR 96] diff --git a/lib/generators/cypress_on_rails/templates/spec/cypress/app_commands/log_fail.rb b/lib/generators/cypress_on_rails/templates/spec/cypress/app_commands/log_fail.rb index 31ec058..a81563c 100644 --- a/lib/generators/cypress_on_rails/templates/spec/cypress/app_commands/log_fail.rb +++ b/lib/generators/cypress_on_rails/templates/spec/cypress/app_commands/log_fail.rb @@ -3,6 +3,8 @@ # grab last lines until "APPCLEANED" (Make sure in clean.rb to log the text "APPCLEANED") system "tail -n 10000 -r log/#{Rails.env}.log | sed \"/APPCLEANED/ q\" | sed 'x;1!H;$!d;x' > 'log/#{filename}.log'" +# Alternative command if the above does not work +# system "tail -n 10000 log/#{Rails.env}.log | tac | sed \"/APPCLEANED/ q\" | sed 'x;1!H;$!d;x' > 'log/#{filename}.log'" # create a json debug file for server debugging json_result = {}