[DEV-258] Add log commands for PHP debugging (#1167)
This commit is contained in:
parent
74870c632a
commit
c64eb9930b
|
@ -25,6 +25,12 @@ test:
|
|||
log:
|
||||
@docker attach opensupports-srv || echo "${red}Please execute 'make run' first${reset}"
|
||||
|
||||
clear-debug:
|
||||
@docker exec -it opensupports-srv bash -c "cd /var/www/html && ./run-clear-debug.sh"
|
||||
|
||||
debug:
|
||||
@docker exec -it opensupports-srv bash -c "cd /var/www/html && ./run-debug.sh"
|
||||
|
||||
stop:
|
||||
@docker stop opensupports-db && docker rm opensupports-db || true
|
||||
@docker stop opensupports-myadmin && docker rm opensupports-myadmin || true
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
<?php
|
||||
|
||||
class Logger {
|
||||
public static function debug($data) {
|
||||
error_log(print_r($data, true), 3, "/var/tmp/debug.log");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
cd /var/tmp
|
||||
if [ -f debug.log ]
|
||||
then
|
||||
rm debug.log
|
||||
fi
|
|
@ -0,0 +1,5 @@
|
|||
cd /var/tmp
|
||||
if [ -f debug.log ]
|
||||
then
|
||||
cat debug.log
|
||||
fi
|
Loading…
Reference in New Issue