Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

crazy sized log messages in ConnectionHandler #1060

Closed
fommil opened this issue Jul 2, 2015 · 2 comments
Closed

crazy sized log messages in ConnectionHandler #1060

fommil opened this issue Jul 2, 2015 · 2 comments

Comments

@fommil
Copy link

fommil commented Jul 2, 2015

I'm using spray-can directly for some low level stuff and when my code hits this line:

case ev log.warning("event pipeline: dropped {}", ev)

well, wow, I can say goodbye to the harddrive, because it prints out multi-multi-gigabyte log messages that look something like:

[WARN] [07/02/2015 14:04:31.313] [default-akka.actor.default-dispatcher-4] [akka://default/user/IO-HTTP/group-0/0] event pipeline: dropped CommandFailed(Write(ByteString(-127, 127, 0, 0, 0, 0, 0, 96, 0, 0 ... LOTS AND LOTS OF BYTE NUMBERS ...

I've noticed others have encountered the same thing, e.g. dcaoyuan/spray-websocket#24

Is there anything can be done? The only workaround I can see is to change the logging level to ERROR to avoid seeing it in the logs.

@fommil
Copy link
Author

fommil commented Jul 2, 2015

fyi, this will silence it (along with a bunch of other stuff that I'd rather not silence). I might have the possibility of override these methods

  <!-- WORKAROUND: https://github.com/spray/spray/issues/1060 -->
  <logger name="spray.can.client.HttpClientConnection" level="ERROR" />

@fommil
Copy link
Author

fommil commented Jul 2, 2015

ok, I was able to workaround by providing an HttpClientConnection with these methods overriden and then in the two locations that log out the warning, change them to just log the class of the message.

An alternative solution might be for akka.io ByteString to not implement toString! I'll create a ticket for that.

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

No branches or pull requests

1 participant