On 17.08.14 09:17, Marcel Bruch wrote:
> Hi,
> 
>> In my opinion the e4-Logger-"API" is completely flawed and we need to
>> first fix this or completely get rid of Logger #
> 
> +1 for getting rid of it.
> 
>> and go for slf4j.
> 
> ±0. I’m undecided yet. While I clearly see the advantage of SLF4J, to be of 
> real value (I think) we'd need a little more than a plain SLF4J logger offers 
> out of the box when logging in Eclipse (UI).
> 
> Besides logging to files, System.out etc. it should be possible to log 
> directly to the Eclipse Error Log view as well. This can generally be 
> achieved by a specific Appender. However, to create meaningful log messages 
> in Eclipse, a logging event should contain information about (i) the bundle 
> that logged the messages (String pluginId in IStatus), and  (ii) an error 
> code (int code in IStatus). 
> 
> 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.
> 
> 
> Regarding Tom’s logger. The key difference to between Tom’s interface and 
> other logger interfaces are additional <loglevel>f() convenience methods; the 
> feature to get a logger injected, could be implemented for any logging 
> framework in E4/Guice (please correct me if I’m wrong here, Tom).
> 

Yes it could be implemented for any DI-Framework and Logging-Framework,
we implemented those 2 because we make use of them (Guice in Xtext,
e4-di in the runtime-framework).

With have some additional ideas on Logging & OSGi (including Bundle-Ids,
....) but nothing is planned yet, I'm waiting on the final result of the
discussion on the architecture council list, I really like our way of
allowing log backends and not depending on any external lib at all.

Tom
_______________________________________________
e4-dev mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/e4-dev

Reply via email to