Problem:
To get response code from server, it is required to enable debugging.
If to enable debugging then log file is located in
./vendor/snowplow/snowplow-tracker/debug/sync-events-log-6626efcd69d653.43454099.log
it is hard-coded in \Snowplow\Tracker\Emitter::initDebugLogFiles()
Some web-script keeps this folder without writing permission.
There is a need to be able to configure log file location in constructor
Attempt to work around -- failed
To do it in 2 steps
To be able to configure log file location in constructor.
To be able to configure log file location in $emitter ->setup()method without causing all request mocked -- not sent to remote server
To be able to disable logging in file as well -- e.g. I am using only returned array.
To be able to disable var_dumps to screen -- e.g. to use $output object or to have 2 modes -- 1) return server responses only 2) real debugging with output
Problem: To get response code from server, it is required to enable debugging. If to enable debugging then log file is located in ./vendor/snowplow/snowplow-tracker/debug/sync-events-log-6626efcd69d653.43454099.log it is hard-coded in \Snowplow\Tracker\Emitter::initDebugLogFiles()
Some web-script keeps this folder without writing permission. There is a need to be able to configure log file location in constructor
Attempt to work around -- failed To do it in 2 steps
This way I get no error on writing permission, but http requests are not sent to remote server.
Work around Declare debug mode in constructor and catch clear screen output
Ideal solution