Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logs break on binary data #53

Closed
nullproxy opened this issue Aug 1, 2017 · 2 comments
Closed

Logs break on binary data #53

nullproxy opened this issue Aug 1, 2017 · 2 comments

Comments

@nullproxy
Copy link
Contributor

When a value that contains content such as binary is provided as the output for a log, these are no longer visible in stdout.

Additionally, after that log, all other logs are affected, with no further output to stdout. This was used in a Middleware processing requests, and not even on subsequent requests were logs visible.

This was using version 1.1.5 of the framework, and version 1.1.8 of the SDK, with system info below:

Linux work 4.2.0-42-generic #49~14.04.1-Ubuntu SMP Wed Jun 29 20:22:11 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
@fcastilloes
Copy link
Contributor

Have you tried without the framework?

Here is the output for a test I just did with the 1.1.10 version of the SDK, with no relevant changes about logging since the 1.1.8. For this I generated a random binary file like this:

dd if=/dev/urandom of=binary bs=1 count=1024

Then I added a log in the startup of an action:

$service->startup(function(Service $service) {
    $service->log("Setting things up");
    $service->log(file_get_contents(__DIR__ . '/binary'));

After launching the SDK alone I get this:

image

While using the framework I get this:

image

Note there is no startup logs from the SDK, but there are logs for the shutdown. I suppose the framework can't handle the binary and skips the whole log stack from the SDK. In this case the startup logs.

I can't see a bug in the SDK here.

@fcastilloes
Copy link
Contributor

Fixed in katana 1.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants