ACRA / acralyzer

Open source backend for ACRA reports.
GNU General Public License v3.0
489 stars 90 forks source link

Application log is missing newlines #21

Closed antoche closed 11 years ago

antoche commented 11 years ago

First of all, did I already mention Acralyzer looks very neat and promising? :)

I'm seeing an odd behaviour here, where the application log in Acralyzer is printed on a single line. Logcat and events log are displayed fine (with the little 'expand' widget).

My application log comes from a file recorded by logback, and looks fine on other backends (e.g., acra-reports). Do I have to format it in a special way for acralyzer, or is this an acralyzer bug?

KevinGaudin commented 11 years ago

This has to be considered as an acralyzer bug ;-)

halkeye commented 11 years ago

Any chance you want to upload an example of it not working? (In /_utils/ select the database, select a row, select source)

That way it can be easily reproduced.

antoche commented 11 years ago

Sure! The source looks like this:

{
    "_id": "197e6e36-4ec2-454a-b5d9-258a54b35241",
    "_rev": "1-1b3a38184603370e980ecef00fe2b8a4",
    "USER_EMAIL": "N/A",
    "APPLICATION_LOG": "2013-03-06 22:32:07,058 INFO [GLThread 11684]

c.o.b.GLRenderer [GLRenderer.java:574] Available size: 720, 960\n2013-03-06 22:32:07,059 INFO [GLThread 11684] c.o.b.GLRenderer [GLRenderer.java:574] Available size: 720, 1280\n2013-03-06 22:32:07,060 INFO [GLThread 11684] c.o.b.GLRenderer [GLRenderer.java:584] Camera size: 720, 1280\n2013-03-06 22:32:49,990 INFO [Timer-0] c.o.b.GLActivity [GLActivity.java:89] Cycle\n2013-03-06 22:33:34,992 INFO [Timer-0] c.o.b.GLActivity [GLActivity.java(etc)", (snip) "LOGCAT": [ "03-07 01:51:44.265 D/dalvikvm(27865): WAIT_FOR_CONCURRENT_GC blocked 33ms", "03-07 01:51:44.305 D/dalvikvm(27865): GC_CONCURRENT freed 511K, 12% free 8163K/9216K, paused 3ms+7ms, total 37ms", "03-07 01:51:44.305 D/dalvikvm(27865): WAIT_FOR_CONCURRENT_GC blocked 30ms", (etc) ] }

So the application log is one long strings with newlines (escaped??) in it, whereas the other logs are nicely split into arrays of strings, one for each line.

The application log is generated by using logback to log into a file and pointing ACRA to that file via setApplicationLogFile. The logback appender is ch.qos.logback.core.FileAppender and the pattern used is %date %level [%thread] %logger{10} [%file:%line] %msg%n.

On Fri, Mar 8, 2013 at 8:29 PM, Gavin notifications@github.com wrote:

Any chance you want to upload an example of it not working? (In /_utils/ select the database, select a row, select source)

That way it can be easily reproduced.

— Reply to this email directly or view it on GitHubhttps://github.com/ACRA/acralyzer/issues/21#issuecomment-14607441 .

KevinGaudin commented 11 years ago

I apply a specific process in Acra-storage to split multiplies log fields into arrays of lines.

I forgot this field. Le 8 mars 2013 10:07, "Antoine Bouthors" notifications@github.com a écrit :

Sure! The source looks like this:

{ "_id": "197e6e36-4ec2-454a-b5d9-258a54b35241", "_rev": "1-1b3a38184603370e980ecef00fe2b8a4", "USER_EMAIL": "N/A", "APPLICATION_LOG": "2013-03-06 22:32:07,058 INFO [GLThread 11684] c.o.b.GLRenderer [GLRenderer.java:574] Available size: 720, 960\n2013-03-06 22:32:07,059 INFO [GLThread 11684] c.o.b.GLRenderer [GLRenderer.java:574] Available size: 720, 1280\n2013-03-06 22:32:07,060 INFO [GLThread 11684] c.o.b.GLRenderer [GLRenderer.java:584] Camera size: 720, 1280\n2013-03-06 22:32:49,990 INFO [Timer-0] c.o.b.GLActivity [GLActivity.java:89] Cycle\n2013-03-06 22:33:34,992 INFO [Timer-0] c.o.b.GLActivity [GLActivity.java(etc)", (snip) "LOGCAT": [ "03-07 01:51:44.265 D/dalvikvm(27865): WAIT_FOR_CONCURRENT_GC blocked 33ms", "03-07 01:51:44.305 D/dalvikvm(27865): GC_CONCURRENT freed 511K, 12% free 8163K/9216K, paused 3ms+7ms, total 37ms", "03-07 01:51:44.305 D/dalvikvm(27865): WAIT_FOR_CONCURRENT_GC blocked 30ms", (etc) ] }

So the application log is one long strings with newlines (escaped??) in it, whereas the other logs are nicely split into arrays of strings, one for each line.

The application log is generated by using logback to log into a file and pointing ACRA to that file via setApplicationLogFile. The logback appender is ch.qos.logback.core.FileAppender and the pattern used is %date %level [%thread] %logger{10} [%file:%line] %msg%n.

On Fri, Mar 8, 2013 at 8:29 PM, Gavin notifications@github.com wrote:

Any chance you want to upload an example of it not working? (In /_utils/ select the database, select a row, select source)

That way it can be easily reproduced.

— Reply to this email directly or view it on GitHub< https://github.com/ACRA/acralyzer/issues/21#issuecomment-14607441> .

— Reply to this email directly or view it on GitHubhttps://github.com/ACRA/acralyzer/issues/21#issuecomment-14610229 .