[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [e4-dev] Logger-API useage in Eclipse codebase
|
On 17.08.2014 09:17, Marcel Bruch wrote:
There is no obvious solution to this. While (i) may be solved by
creating a your own LoggerFactory and Logger implementation (which
delegates to, say, Logback but adds additional information like the
plugin id to a logging event), I see no obvious solution to offer
unique error codes for each logging message. Maybe someone else has
achieved something similar before? FWIW, I thought about using Markers
for error codes, but they are too limited and not very handy to use
for that purpose.
For our eclipse RCPs we use a logger that allows to add keywords to a
message. So a log entry basically consists of a messge, a timestamp and
a string[] of keywords.
Predefined keywords exist for ERROR, WARNING, FINE, FINER, ... whatever
granularity you want. Additionally you could set your plugin-id as
additional keyword or things like "UI", "JDT", "Build"...
We further use a view to display, highlight and filter messages upon
those keywords.
regards
Christian