Skip to content

Commit

Permalink
devtools update for rotated logs
Browse files Browse the repository at this point in the history
  • Loading branch information
jesdynf committed Apr 26, 2022
1 parent 98c2b5f commit 1fe24ae
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
6 changes: 5 additions & 1 deletion docker/openemr/flex-3.15-8/utilities/devtools
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ source /root/devtoolsLibrary.source

if [ "$1" == "php-log" ]; then
echo "Generating PHP error log"
cat /var/log/apache2/error.log
if [[ $(ls -1tc /var/log/apache2/error.log* | wc -l) -gt 0 ]]; then
cat $(ls -1tc /var/log/apache2/error.log* | head -n 1)
else
echo "no PHP error log found";
fi
fi

if [ "$1" == "build-themes" ]; then
Expand Down
6 changes: 5 additions & 1 deletion docker/openemr/flex-3.15/utilities/devtools
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ source /root/devtoolsLibrary.source

if [ "$1" == "php-log" ]; then
echo "Generating PHP error log"
cat /var/log/apache2/error.log
if [[ $(ls -1tc /var/log/apache2/error.log* | wc -l) -gt 0 ]]; then
cat $(ls -1tc /var/log/apache2/error.log* | head -n 1)
else
echo "no PHP error log found";
fi
fi

if [ "$1" == "build-themes" ]; then
Expand Down
6 changes: 5 additions & 1 deletion docker/openemr/flex-edge/utilities/devtools
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ source /root/devtoolsLibrary.source

if [ "$1" == "php-log" ]; then
echo "Generating PHP error log"
cat /var/log/apache2/error.log
if [[ $(ls -1tc /var/log/apache2/error.log* | wc -l) -gt 0 ]]; then
cat $(ls -1tc /var/log/apache2/error.log* | head -n 1)
else
echo "no PHP error log found";
fi
fi

if [ "$1" == "build-themes" ]; then
Expand Down

0 comments on commit 1fe24ae

Please sign in to comment.