Webception
Webception copied to clipboard
How to print log on Webception
Webception only shows 1 type of log file. It's not good idea why on console we can print with many type like html/xml/debug ... :( pls show to me how we can set it.
there's a way around this, might not be optimal but I've done it in the past like this: open webception/App/Lib/Codeception.php look for getCommandPath around line 333 and add options as you need. I always use the same options as I don't have a need to get them from a config file (might be a good thing to do/consider as there's already a config option in there), but for the sake of doing this try:
public function getCommandPath($type, $filename)
{
// Build all the different parameters as part of the console command
$params = array(
$this->config['executable'], // Codeception Executable
"run", // Command to Codeception
"--no-colors", // Forcing Codeception to not use colors, if enabled in codeception.yml
"--verbose", //
"--debug", //
"--steps", //
"--html", //
"--json", //
"--xml", //
"-n", //
"--config=\"{$this->site->getConfig()}\"", // Full path & file of Codeception
$type, // Test Type (Acceptance, Unit, Functional)
$filename, // Filename of the Codeception test
"2>&1" // Added to force output of running executable to be streamed out
);
// Build the command to be run.
return implode(' ', $params);
}