Comments (6)
I think this is a reasonable approach.
Longer term, I would like to serialize an Exception in a text form which
allows deserialization, however can be read without the class which created
it.
On 10 March 2015 at 21:03, Alexandre Victoor [email protected]
wrote:
Hello
This ticket is related to the comments of former ticket 15
When a binary appender is used, an exception is serialized with serializer
"JDKZObjectSerializer". This implies that you cannot read logs if you do
not have in your classpath the exception classes that have been used by the
application that has generated the logs.
This forbid to use ChroniTail, ChroniCat and the other tools working as
standalone tools...
Also this almost forbid applications to refactor their exception classes.
Instead of serializing the exception itself, I think that the logger
should serialize an object containing two strings:
- the exception message
- the exception stack trace as a string
—
Reply to this email directly or view it on GitHub
#26.
from chronicle-logger.
It is reasonable for exceptions but it doesn't for other objects so if you call logger.info("got {}", obj, except) to a binary appender , exception will be always readable but obj won't unless you have it in the class-path. The simplest way to have an 'open' log is to use a TextAppendet which format the message and serialized exceptions as strings.
I can easily add an option to serialize exception as strings but as mentioned above, non simple objects require the class to be available, is that an acceptable limitation?
I can also add an option to chronicle to serialize objects without compression.
from chronicle-logger.
Thanks for your responses
Is there any doc on how works a binary chronicle/appender vs a text one?
I have done a few tests and even when i just log a string, the binary appender is much faster than the text one. I do not get why? Compression is done by default?
from chronicle-logger.
Not at the moment but I will document the difference between binary and text as soon as possible.
The main difference is that binary use buffer.write(...) wich write bytes (i.e. 4 bit for an int) whereas text uses buffer.append(...) which write thing in a human readable form (similar to append strings); in addition the TextAppender need to format the message (i.e. the logback appender invokes ILoggingEvent.getFormattedMessage).
Yes at the moment compression is done by default, I will add an option to Chronicle V3 to disable it.
from chronicle-logger.
Thanks!
much more clear now. I was not aware that I could use the Externalizable interface and did not know BytesMarshallable and DataValueClasses...
BTW next month I will do a talk at devoxx france and I will talk a little bit of openhft 👍
from chronicle-logger.
@alexvictoor can we close this issue ?
from chronicle-logger.
Related Issues (20)
- OWASP giving security error on Chronicle-Logger HOT 6
- Unable to upgrade to slf4j 2.x HOT 4
- Chronicle logger tools not reading logs HOT 1
- Chronicle-Logger doesn't work on Solaris/SPARC due to unsafe memory access HOT 1
- Performance HOT 3
- Log4j2 and invalid attributes HOT 1
- Compression HOT 5
- logging an arbitrary object using Chronicle logger throws IllegalStateException HOT 3
- Compiled Jar HOT 1
- Bump log4j2 version HOT 3
- Chronicle-Logger rollover to compressed file(gzip) HOT 4
- Chronicle-Logger time-based rolling and compression HOT 4
- chronicle-logger 4.17.2 pom.xml is referencing non-existing version of chronicle-bom HOT 4
- ChronicleLogReader fails while running processLog() HOT 2
- chronicle-logger-slf4j has dependency on slf4j-simple
- Infinite loop when mysql-connector-java or netty is on the classpath HOT 3
- How to append extended information to logger HOT 3
- TeamCity build is broken
- ChronicleLogManager is not thread-safe HOT 1
- fixed test net.openhft.chronicle.logger.jul.JulLoggerChronicleTest HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chronicle-logger.