Logging in yangide


Michael Vorburger
 

David,

I realized that the previously merge https://git.opendaylight.org/gerrit/#/c/38175/ wasn't the brightest idea.. because instead of spamming STDOUT, yangide now pollutes the Error Log view in Eclipse during "normal operations", which is arguably even worse (because in the Eclipse default configuration, the Error Log pops into the user face every time something goes into it, and it should thus only be used for real errors blocking users, no frequent normal debug kind of messages).

We should thus change all YangCorePlugin.log(IStatus.INFO) and similar in yangide. I've just done a quick test with using IStatus.OK instead of IStatus.INFO, but that's no better. 

We can instead do one of two things:

1) Use e.g. slf4j for logging in yangide, as proposed in https://git.opendaylight.org/gerrit/39272. (FYI: Logging in Eclipse plugins is a little bit of a mess, and slf4j is not what Eclipse plugins use by default, but it can be made to work with some configuration. It also has the advantage that for stuff like yangide, with M2E Maven integration, and calling into yangtools non-Eclipse code which uses slf4j, one could get uniform logging, if needed.)

2) Keep things more as-is, but don't log IStatus.OK instead of IStatus.INFO to Error View unless isDebugging(), as proposed in https://git.opendaylight.org/gerrit/#/c/39274/.

Which direction would you like to go? Please merge one of the proposed changes above, and we'll abandon the other.

Tx,
M.
--
Michael Vorburger <vorburger@...> | IRC: vorburger @freenode | G/Hangout: michael.vorburger | Skype: mike_vorburger | ~ = http://vorburger.ch


David M. Karr
 

Acknowledged.  I’ll look closer at this tomorrow.

 

From: yangide-dev-bounces@... [mailto:yangide-dev-bounces@...] On Behalf Of Michael Vorburger
Sent: Monday, May 23, 2016 8:36 AM
To: yangide-dev@...
Subject: [yangide-dev] Logging in yangide

 

David,

 

I realized that the previously merge https://git.opendaylight.org/gerrit/#/c/38175/ wasn't the brightest idea.. because instead of spamming STDOUT, yangide now pollutes the Error Log view in Eclipse during "normal operations", which is arguably even worse (because in the Eclipse default configuration, the Error Log pops into the user face every time something goes into it, and it should thus only be used for real errors blocking users, no frequent normal debug kind of messages).

 

We should thus change all YangCorePlugin.log(IStatus.INFO) and similar in yangide. I've just done a quick test with using IStatus.OK instead of IStatus.INFO, but that's no better. 

 

We can instead do one of two things:

 

1) Use e.g. slf4j for logging in yangide, as proposed in https://git.opendaylight.org/gerrit/39272. (FYI: Logging in Eclipse plugins is a little bit of a mess, and slf4j is not what Eclipse plugins use by default, but it can be made to work with some configuration. It also has the advantage that for stuff like yangide, with M2E Maven integration, and calling into yangtools non-Eclipse code which uses slf4j, one could get uniform logging, if needed.)

 

2) Keep things more as-is, but don't log IStatus.OK instead of IStatus.INFO to Error View unless isDebugging(), as proposed in https://git.opendaylight.org/gerrit/#/c/39274/.

 

Which direction would you like to go? Please merge one of the proposed changes above, and we'll abandon the other.


Tx,

M.

--

Michael Vorburger <vorburger@...> | IRC: vorburger @freenode | G/Hangout: michael.vorburger | Skype: mike_vorburger | ~ = http://vorburger.ch