swagger-php icon indicating copy to clipboard operation
swagger-php copied to clipboard

No output on CLI

Open 3ynm opened this issue 1 year ago • 1 comments

For some reason the CLI is giving me no output at all.

$ ./vendor/bin/openapi --help
$ echo $?
1
$ ./vendor/zircote/swagger-php/bin/openapi --help
$ echo $?
1

Apparently it has something to do with the logger you use to output data. If I put echo $help previous to $logger->info($help), I get the output.

Sadly, I don't know what other information can I give you about my environment to reproduce the issue.

I'm using PHP 8.1.29 on a CentOS 7 environment.

3ynm avatar Jul 30 '24 16:07 3ynm

Yeah, that logger is a pain and just wraps the original code from the script in a PSR logger to make things a bit nicer overall.

Under the hood is uses [error_log](https://www.php.net/manual/en/function.error-log.php), so I suspect that your system is configured to write that to syslog rather than stdout/stderr.

I'll label this as enhancement - something I'd been meaning to improve for quite some time...

DerManoMann avatar Jul 30 '24 23:07 DerManoMann