[logback-user] RCP

Tony Trinh tony19 at gmail.com
Thu May 24 19:07:45 CEST 2012


Thanks, Ceki. I'm thinking we can put EclipseLogAppender.java in
logback-extensions [1] and package it as a JAR that users could add to
their Eclipse projects. Separating it from the main logback source makes
sense to me especially because it depends on a couple Eclipse packages. A
link to it from the logback.qos.ch (or the documentation therein) might be
helpful for users to find it. Thoughts?

[1]: https://github.com/qos-ch/logback-extensions


On Thu, May 24, 2012 at 12:34 PM, ceki <ceki at qos.ch> wrote:

> Hi Tony,
>
> Nice work! Do you have suggestions as how to package this code? Should be
> it be a Eclipse plugin? (I am assuming it can be anything else).
>
> --
> Ceki
> http://twitter.com/#!/ceki
>
>
>
> On 24.05.2012 18:27, Tony Trinh wrote:
>
>> On Thu, May 24, 2012 at 11:25 AM, Tony Trinh <tony19 at gmail.com
>> <mailto:tony19 at gmail.com>> wrote:
>>
>>
>>    See the attached sample project with this all working. I created the
>>    EclipseLogAppender class, which writes to Eclipse's Error Log. (It
>>    would be nice to add this class to logback's source, but it's
>>    dependent on Eclipse packages...not sure how to handle that.) To run
>>    the example:
>>
>>        1. From Eclipse, import the attached sample project (choose menu
>>        "File > Import... > Existing Projects into Workspace").
>>        2. Download logback-core-1.0.3.jar, logback-classic-1.0.3.jar,
>>        and slf4j-api-1.6.4.jar into the project's "libs" directory.
>>        3. Rebuild and run the project (which opens a new instance of
>>        Eclipse).
>>        4. From the new instance of Eclipse, open the Error Log (menu
>>        "Window > Show Views > Error Log"), and choose menu "Sample Menu
>>         > Sample Command". This causes a "Hello World" message box,
>>        followed by a log entry in the Error Log.
>>
>> I updated EclipseLogAppender to decouple it from the plugin; it now
>> requires the plugin bundle's symbolic name (as specified in the
>> "Bundle-SymbolicName" property in the plugin's manifest), which is set
>> in the logback config as seen below:
>>
>> <configuration>
>> <appender name="eclipse" class="ch.qos.logback.classic.**
>> EclipseLogAppender">
>> <encoder>
>> <pattern>[%method] > %msg%n</pattern>
>> </encoder>
>> <bundleName>com.example.e4.**helloworld</bundleName>
>> </appender>
>>
>> <root level="TRACE">
>> <appender-ref ref="eclipse" />
>> </root>
>> </configuration>
>>
>>
> ______________________________**_________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://mailman.qos.ch/mailman/**listinfo/logback-user<http://mailman.qos.ch/mailman/listinfo/logback-user>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20120524/b88a27ee/attachment.html>


More information about the Logback-user mailing list