Excessive debug logging?

All Union Platform questions, comments, feature requests, and bug reports.

Excessive debug logging?

Postby toby » Tue 02 Dec 2014 19:43

The union server logs are EXTREMELY useful for debugging,
as they are the main source of evidence for what has happened.

I appreciate that they are as useful to Union developers as well,
but from my point of view, all the messages relating to lower level
database calls and such just clutter things up, and in some minor
way, slow things down.

I wonder if some of the Union generated lines could be suppressed.
NOT, of course, all the messages-to-and-from-clients, those are gold!

But for example:

When a user logs in there are 2326 of these:
2014-12-02 22:53:41,255 DEBUG - result row: EntityKey[net.user1.union.persistence.union.AccountAttribute#11730944]

When those get done we take a pause:
2014-12-02 22:53:41,255 DEBUG - about to close ResultSet (open ResultSets: 1, globally: 1)
2014-12-02 22:53:41,255 DEBUG - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)

And the reflection is seen: 2326 pairs like this:
2014-12-02 22:53:41,255 DEBUG - resolving associations for [net.user1.union.persistence.union.AccountAttribute#32768]
2014-12-02 22:53:41,255 DEBUG - done materializing entity [net.user1.union.persistence.union.AccountAttribute#32768]

To be honest, I don't see any value in those messages, although probably at some stage of development,
there was or is.

All the SQL calls seem to work ok - or should in a released version - so maybe those can be suppressed, too.
toby
 
Posts: 162
Joined: Sun 24 Jun 2012 14:18

Re: Excessive debug logging?

Postby toby » Sun 07 Dec 2014 02:09

The logging of the all the UPC traffic is great!

Unfortunately, to get it, you must set the debug level to DEBUG,
and that brings along MASSIVE amounts of lines.
The usefulness of which I question.

No wonder my app is generating 5 MB of log files in 20 minutes!

Logins are perhaps the worst offenders.

I just observed what happens:
I send a message to a room which performs a login on the client's behalf.
There is some room observation and client attribute setting, but this only
adds a few lines.

The total number of lines of log generated by this login is ... 7804.
Seven Thousand Eight Hundred and Four.

Over 5000 of those are as I mentioned above:
result rows, materializing entities, resolving associations.

If you really want to keep all that in the logs,
would it be possible to introduce another category
like INFO, DEBUG, etc ... or use the existing ones differently?

That way I could set the level appropriately to eliminated "union debugging"
but still be able to trace the UPC's and add my own at a higher level.
toby
 
Posts: 162
Joined: Sun 24 Jun 2012 14:18


Return to Union Platform

Online

Users browsing this forum: No registered users and 7 guests