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
Unable to read logs which contains unprintable characters #26
Comments
I need more info about how to reproduce this.
etc. |
|
Fixed handling of invalid XML created by java.util.logging.XMLFormatter. This fixes issue #26.
This should now be fixed in master. It would be nice if you could confirm if everything is fine or if I missed something. Cheers, and thanks for the report! |
Building sulky ok, build lilith with errors:
This is the report: Test Summary |
Plus, if I try to run the "8.1.0-SNAPSHOT" with lilith.bat I get an error for input line too long, and lilith isn't started. Did anybody try the snapshot build with windows? |
Nope, I don't have access to any Windows machine. Gradle should tell you about the location of the test report. It would be great if you could take a look at that HTML report and find out what's going wrong in the FormatterSpecs exactly. The file should be There should also be a I never heard of anything like that. Could be related to that strange Windows path length limit of 256 characters, though, so moving the whole distribution to a shorter path might already fix the problem. Just guessing here, though. |
Regarding the tests: I suspect it's line ending stuff but I need to know... |
This should fix the tests on Windows. See issue #26.
I likely fixed the tests on Windows. Can't check myself, though. |
I guess http://www.digizol.com/2006/12/input-line-is-too-long-windows-command.html describes the Moving the lilith install to a shorter path should fix the problem. Or simply use the |
with You might need this http://stackoverflow.com/questions/3585053/in-java-is-it-possible-to-check-if-a-string-is-only-ascii I'll try with a shorter path, but I fear that the problem is because too many libraries are named "-SNAPSHOT" thus increasing their name size. Not much to do here, except document it on the readme. |
The � are created by me explicitly in case of invalid characters contained in the XML stream erroneously produced by The problem you are actually facing is I'd strongly suggest to move away to a logging framework that is based on SLF4J. If you'd use Logback with the Lilith appender then you'd get exactly the behavior you suggest, i.e. a But I know that circumstances won't always allow a free choice regarding the frameworks that are allowed to be used... |
My problem is that I can't use Java 8 on the runtime log. Is it possible to have lilith appender compiled for earlier JDK? Lilith itself (herself?) is fine. |
Just use version |
Can't make it work :( here is the pastebin: |
I'm not sure what's wrong with the config. The I'd suggest that you try to get the config right with a small program that's just creating log events in a loop, ideally with some You can try a Logback SocketAppender with a I can't see any obvious error in your config... I might miss something, though. |
Ok, I think I've found it. Let's make a step backward: originally, I had no idea which jar was needed for the logger, so I picked de.huxhorn.lilith.logback.appender.multiplex-classic.jar or something like that. But it complained of missing classes, so I added the classes until the error was gone. Now on my test case it says again Failed to instantiate [ch.qos.logback.classic.LoggerContext] ...so I guess I should ditch the effort and just ask: which jar should I use? |
Oh, you aren't using Maven or Gradle... Let's see... Below are the runtime dependencies of
You can find out about those by changing into the directory Both Maven and Gradle would take care of those for you. Hope that helps. |
OK that worked, but I stil don't see unprintable characters even with de.huxhorn.lilith.logback.appender.ClassicMultiplexSocketAppender
On the lilith log I see " 1" |
Your call should look like this: I'm not sure if |
That did it! Yes, I get decimal values (49 instead of 0x31) but is enough. Many thanks! :) |
I'd like to change the Remotehost of ClassicMultiplexSocketAppender programmatically... how can I do that? |
That's more of a Logback issue than a Lilith issue. Please refer to the manual. It would probably be enough to use a Groovy Logback configuration instead of XML. |
I have logs that sometimes contains unprintable characters (hexadecimal value 0x00, for example). In this case Lilith discards the record.
The text was updated successfully, but these errors were encountered: