
Hi, I've been searching in the docs and the mailinglist but it seems like Logback does not support a reconfiguration every x seconds like log4j's DOMConfigurator. Is this feature planned? Thanks, Mike -- <NO> OOXML - Say NO To Microsoft Office broken standard http://www.noooxml.org

If I'm using an evaluator "HAS_MARKER" which evaluates the Expression marker != null and then in my layout - I'm using this Pattern -[%marker{HAS_MARKER}]- it prints -[]- is there a way to use this Evaluator that nothing is printed ? thx ekke

Hello Ekke, MarkerConverter which handles the %marker conversion word, does not take an evaluator as an option. May I ask what is it that you are trying to accomplish? ekkehard wrote:
If I'm using an evaluator "HAS_MARKER" which evaluates the Expression marker != null
and then in my layout - I'm using this Pattern
-[%marker{HAS_MARKER}]-
it prints -[]-
is there a way to use this Evaluator that nothing is printed ?
thx
ekke
-- Ceki Gülcü Logback: The reliable, generic, fast and flexible logging framework for Java. http://logback.qos.ch

Ceki Gulcu schrieb:
Hello Ekke,
MarkerConverter which handles the %marker conversion word, does not take an evaluator as an option. May I ask what is it that you are trying to accomplish?
if there's no marker, then I dont want to print -[]- but if theres a marker I want to print -[%marker{HAS_MARKER}]- ekke
ekkehard wrote:
If I'm using an evaluator "HAS_MARKER" which evaluates the Expression marker != null
and then in my layout - I'm using this Pattern
-[%marker{HAS_MARKER}]-
it prints -[]-
is there a way to use this Evaluator that nothing is printed ?
thx
ekke
-- ekkehard gentz software-architect erp-consultant max-josefs-platz 30, D-83022 rosenheim, germany homeoffice (1+1 VoIP): +49 8031 2068 325 mobile (iPhone): +49 151 19424929 mailto:ekkehard@gentz-software.de homepage: http://www.gentz-software.de opensource: http://ekkehard.org blog (en): http://ekkes-corner.org blog (de): http://ekkes-ecke.org skype: ekke.gentz Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490

ekkehard schrieb:
Ceki Gulcu schrieb:
Hello Ekke,
MarkerConverter which handles the %marker conversion word, does not take an evaluator as an option. May I ask what is it that you are trying to accomplish?
if there's no marker, then I dont want to print -[]-
but if theres a marker I want to print -[%marker{HAS_MARKER}]-
ekke
I mean -[%marker]- (just learned from your mail that I cannot use an evakluator there ;-)

Hi Ekke, Here is the code for MarkerConverter: ======= Start MarkerConverter.hava ======== package ch.qos.logback.classic.pattern; import org.slf4j.Marker; import ch.qos.logback.classic.spi.LoggingEvent; /** * Return the event's marker value(s). * * @author Sébastien Pennec */ public class MarkerConverter extends ClassicConverter { private static String EMPTY = ""; public String convert(LoggingEvent le) { Marker marker = le.getMarker(); if (marker == null) { return EMPTY; } else { return marker.toString(); } } } ======= End MarkerConverter.hava ======== Studying the code above, I would say that you have two options. First, just remove the [] from the conversion pattern. So instead of writing "%d %level [%marker] - %msg%n" as you conversion pattern, just write "%d %level %marker - %msg%n" You second option is to write your own converter for handling markers. You could modify it to return an empty string if there is no marker, and to return "["+marker.toString()+"]" if there is a marker in the event. Here is sample code: package de.gentz-software.logback; import org.slf4j.Marker; import ch.qos.logback.classic.spi.LoggingEvent; public class MyMarkerConverter extends ClassicConverter { private static String EMPTY = ""; public String convert(LoggingEvent le) { Marker marker = le.getMarker(); if (marker == null) { return EMPTY; } else { return "["+marker.toString()+"]"; } } } You also need to let logback know about your conversion word. Here is how: <conversionRule conversionWord="myMarker" converterClass="de.gentz-software.logback.MyMarkerConverter"/> Here is a sample config file: <configuration> <conversionRule conversionWord="myMarker" converterClass="de.gentz-software.logback.MyMarkerConverter" /> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <layout class="ch.qos.logback.classic.PatternLayout"> <Pattern>%-4relative [%thread] %myMarker - %msg%n</Pattern> </layout> </appender> <root> <level value="debug" /> <appender-ref ref="STDOUT" /> </root> </configuration> I hope this helps, ekkehard wrote:
ekkehard schrieb:
Ceki Gulcu schrieb:
Hello Ekke,
MarkerConverter which handles the %marker conversion word, does not take an evaluator as an option. May I ask what is it that you are trying to accomplish?
if there's no marker, then I dont want to print -[]-
but if theres a marker I want to print -[%marker{HAS_MARKER}]-
ekke
I mean
-[%marker]-
(just learned from your mail that I cannot use an evakluator there ;-)
-- Ceki Gülcü Logback: The reliable, generic, fast and flexible logging framework for Java. http://logback.qos.ch

Ceki Gulcu schrieb:
Hi Ekke,
Here is the code for MarkerConverter:
======= Start MarkerConverter.hava ======== package ch.qos.logback.classic.pattern;
import org.slf4j.Marker;
import ch.qos.logback.classic.spi.LoggingEvent;
/** * Return the event's marker value(s). * * @author Sébastien Pennec */ public class MarkerConverter extends ClassicConverter {
private static String EMPTY = "";
public String convert(LoggingEvent le) { Marker marker = le.getMarker(); if (marker == null) { return EMPTY; } else { return marker.toString(); } } } ======= End MarkerConverter.hava ========
Studying the code above, I would say that you have two options. First, just remove the [] from the conversion pattern. So instead of writing
"%d %level [%marker] - %msg%n"
as you conversion pattern, just write
"%d %level %marker - %msg%n"
You second option is to write your own converter for handling markers. You could modify it to return an empty string if there is no marker, and to return "["+marker.toString()+"]" if there is a marker in the event. Here is sample code:
package de.gentz-software.logback;
import org.slf4j.Marker; import ch.qos.logback.classic.spi.LoggingEvent;
public class MyMarkerConverter extends ClassicConverter {
private static String EMPTY = "";
public String convert(LoggingEvent le) { Marker marker = le.getMarker(); if (marker == null) { return EMPTY; } else { return "["+marker.toString()+"]"; } } }
You also need to let logback know about your conversion word. Here is how:
<conversionRule conversionWord="myMarker" converterClass="de.gentz-software.logback.MyMarkerConverter"/>
Here is a sample config file:
<configuration> <conversionRule conversionWord="myMarker" converterClass="de.gentz-software.logback.MyMarkerConverter" />
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <layout class="ch.qos.logback.classic.PatternLayout"> <Pattern>%-4relative [%thread] %myMarker - %msg%n</Pattern> </layout> </appender>
<root> <level value="debug" /> <appender-ref ref="STDOUT" /> </root> </configuration>
I hope this helps,
of course - thanks :-) ...gives me some more ideas how to solve it best to print OSGI bundle-name and service-name I put into the Marker-tree ekke

Ceki, just tried my custom MarkerConverter but I got an error: ERROR in ch.qos.logback.core.pattern.parser.Compiler@26312 - [bundlemarker] is not a valid conversion word --------- from my config file: ... <conversionRule conversionWord="bundlemarker" converterClass="org.ekkehard.logback.util.BundleMarkerConverter"/> ... <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <layout class="ch.qos.logback.classic.PatternLayout"> <Pattern>%d{HH:mm:ss.SSS} %-5level [%logger{40}] %bundlemarker %msg%n</Pattern> </layout> </appender> ----- perhaps the problem is that my BundleMarkerConverter class was not found - all runs under OSGI what do you think - should I add the import to logback core or logback classic ? or could something else be wrong because the error notes that the conversion word wasn't valid and not that class BundleMarkerConverter wasn't found thanks ekke ekkehard schrieb:
Ceki Gulcu schrieb:
Hi Ekke,
Here is the code for MarkerConverter:
======= Start MarkerConverter.hava ======== package ch.qos.logback.classic.pattern;
import org.slf4j.Marker;
import ch.qos.logback.classic.spi.LoggingEvent;
/** * Return the event's marker value(s). * * @author Sébastien Pennec */ public class MarkerConverter extends ClassicConverter {
private static String EMPTY = "";
public String convert(LoggingEvent le) { Marker marker = le.getMarker(); if (marker == null) { return EMPTY; } else { return marker.toString(); } } } ======= End MarkerConverter.hava ========
Studying the code above, I would say that you have two options. First, just remove the [] from the conversion pattern. So instead of writing
"%d %level [%marker] - %msg%n"
as you conversion pattern, just write
"%d %level %marker - %msg%n"
You second option is to write your own converter for handling markers. You could modify it to return an empty string if there is no marker, and to return "["+marker.toString()+"]" if there is a marker in the event. Here is sample code:
package de.gentz-software.logback;
import org.slf4j.Marker; import ch.qos.logback.classic.spi.LoggingEvent;
public class MyMarkerConverter extends ClassicConverter {
private static String EMPTY = "";
public String convert(LoggingEvent le) { Marker marker = le.getMarker(); if (marker == null) { return EMPTY; } else { return "["+marker.toString()+"]"; } } }
You also need to let logback know about your conversion word. Here is how:
<conversionRule conversionWord="myMarker" converterClass="de.gentz-software.logback.MyMarkerConverter"/>
Here is a sample config file:
<configuration> <conversionRule conversionWord="myMarker" converterClass="de.gentz-software.logback.MyMarkerConverter" />
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <layout class="ch.qos.logback.classic.PatternLayout"> <Pattern>%-4relative [%thread] %myMarker - %msg%n</Pattern> </layout> </appender>
<root> <level value="debug" /> <appender-ref ref="STDOUT" /> </root> </configuration>
I hope this helps,
of course - thanks :-)
...gives me some more ideas how to solve it best to print OSGI bundle-name and service-name I put into the Marker-tree
ekke _______________________________________________ Logback-user mailing list Logback-user@qos.ch http://qos.ch/mailman/listinfo/logback-user

ekkehard wrote:
perhaps the problem is that my BundleMarkerConverter class was not found - all runs under OSGI
Yes, that is probably the cause of the problem. I have committed changes for better error reporting. Could you build logback from the trunk? It should be as easy as: svn co http://svn.qos.ch/repos/logback/trunk/ target_directory cd target_diurectory mvn install
what do you think - should I add the import to logback core or logback classic ? or could something else be wrong because the error notes that the conversion word wasn't valid and not that class BundleMarkerConverter wasn't found
The error message can be misleading, hence my recent commit. The problem is most probably related to loading the BundleMarkerConverter class.
thanks -- Ceki Gülcü Logback: The reliable, generic, fast and flexible logging framework for Java. http://logback.qos.ch

Ceki Gulcu schrieb:
ekkehard wrote:
perhaps the problem is that my BundleMarkerConverter class was not found - all runs under OSGI
Yes, that is probably the cause of the problem. I have committed changes for better error reporting. great :-) Could you build logback from the trunk?
just have to leave to a customer... at the weekend...
It should be as easy as:
svn co http://svn.qos.ch/repos/logback/trunk/ target_directory cd target_diurectory mvn install
what do you think - should I add the import to logback core or logback classic ? or could something else be wrong because the error notes that the conversion word wasn't valid and not that class BundleMarkerConverter wasn't found
The error message can be misleading, hence my recent commit. The problem is most probably related to loading the BundleMarkerConverter class.
I'll try and report the solution thx for helping ekke

Ceki Gulcu schrieb:
ekkehard wrote:
perhaps the problem is that my BundleMarkerConverter class was not found - all runs under OSGI
Yes, that is probably the cause of the problem. I have committed changes for better error reporting. Could you build logback from the trunk?
It should be as easy as:
svn co http://svn.qos.ch/repos/logback/trunk/ target_directory cd target_diurectory mvn install
I tried it but got an error: [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Failed to resolve artifact. Missing: ---------- 1) org.slf4j:slf4j-api:jar:1.5.4-SNAPSHOT Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=org.slf4j -DartifactId=slf4j-api \ -Dversion=1.5.4-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file Path to dependency: 1) ch.qos.logback:logback-classic:jar:0.9.10-SNAPSHOT 2) org.slf4j:slf4j-api:jar:1.5.4-SNAPSHOT ---------- 1 required artifact is missing. for artifact: ch.qos.logback:logback-classic:jar:0.9.10-SNAPSHOT from the specified remote repositories: central (http://repo1.maven.org/maven2) ---------------------------------------------------------------------------------------------------- doesnt matter - I found the solution for OSGI: I had to add a package-import-dependency to logback-classic bundle: import-package: org.ekkehard.logback.util now my org.ekkehard.logback.util.BundleMarkerConverter was found and works well :-) BTW: I started with logback-test.xml and <configuration debug="true"> would be great if you could print also if conversionRules were well or wrong thx ekke -- ekkehard gentz software-architect erp-consultant max-josefs-platz 30, D-83022 rosenheim, germany homeoffice (1+1 VoIP): +49 8031 2068 325 mobile (iPhone): +49 151 19424929 mailto:ekkehard@gentz-software.de homepage: http://www.gentz-software.de opensource: http://ekkehard.org blog (en): http://ekkes-corner.org blog (de): http://ekkes-ecke.org skype: ekke.gentz Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490

ekkehard schrieb:
Ceki Gulcu schrieb:
ekkehard wrote:
perhaps the problem is that my BundleMarkerConverter class was not found - all runs under OSGI
Yes, that is probably the cause of the problem. I have committed changes for better error reporting. Could you build logback from the trunk?
It should be as easy as:
svn co http://svn.qos.ch/repos/logback/trunk/ target_directory cd target_diurectory mvn install
I tried it but got an error:
[INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Failed to resolve artifact.
Missing: ---------- 1) org.slf4j:slf4j-api:jar:1.5.4-SNAPSHOT
Try downloading the file manually from the project website.
Then, install it using the command: mvn install:install-file -DgroupId=org.slf4j -DartifactId=slf4j-api \ -Dversion=1.5.4-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
Path to dependency: 1) ch.qos.logback:logback-classic:jar:0.9.10-SNAPSHOT 2) org.slf4j:slf4j-api:jar:1.5.4-SNAPSHOT
---------- 1 required artifact is missing.
for artifact: ch.qos.logback:logback-classic:jar:0.9.10-SNAPSHOT
from the specified remote repositories: central (http://repo1.maven.org/maven2)
----------------------------------------------------------------------------------------------------
doesnt matter - I found the solution for OSGI:
I had to add a package-import-dependency to logback-classic bundle:
import-package: org.ekkehard.logback.util
now my org.ekkehard.logback.util.BundleMarkerConverter was found and works well :-)
BTW: it works using import-package, but then PDE detects a cycle, the better way is to use org.ekkehard.logback.util - bundle as a fragment bundle of logback-classic (I'll report about this in my next blog entry) ekke
BTW: I started with logback-test.xml and <configuration debug="true"> would be great if you could print also if conversionRules were well or wrong
thx
ekke
--
ekkehard gentz software-architect erp-consultant max-josefs-platz 30, D-83022 rosenheim, germany homeoffice (1+1 VoIP): +49 8031 2068 325 mobile (iPhone): +49 151 19424929 mailto:ekkehard@gentz-software.de homepage: http://www.gentz-software.de opensource: http://ekkehard.org blog (en): http://ekkes-corner.org blog (de): http://ekkes-ecke.org skype: ekke.gentz Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490
------------------------------------------------------------------------
_______________________________________________ Logback-user mailing list Logback-user@qos.ch http://qos.ch/mailman/listinfo/logback-user
-- ekkehard gentz software-architect erp-consultant max-josefs-platz 30, D-83022 rosenheim, germany homeoffice (1+1 VoIP): +49 8031 2068 325 mobile (iPhone): +49 151 19424929 mailto:ekkehard@gentz-software.de homepage: http://www.gentz-software.de opensource: http://ekkehard.org blog (en): http://ekkes-corner.org blog (de): http://ekkes-ecke.org skype: ekke.gentz Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490

I read about the changes with Markers - thanks - I also was thinking about Markers as a tree - now I know its only a graph of connected Markers following scenario: create a Marker with a Bundle-Name add one or more Marker with Service-Names then I have a BundleMarkerConverter. Testing marker.getName().startsWith(ConstantsAndProperties.BUNDLE_MARKER_PREFIX) I know if its a BundleMarker now there can be Markers with SERVICE_MARKER_PREFIX in the graph - whats the recommanded way to get them all: using the iterator ? thx ekke

Hello Ekke, What is it that you are trying to accomplish, in plain English? ekkehard wrote:
I read about the changes with Markers - thanks - I also was thinking about Markers as a tree - now I know its only a graph of connected Markers
following scenario: create a Marker with a Bundle-Name add one or more Marker with Service-Names
then I have a BundleMarkerConverter. Testing marker.getName().startsWith(ConstantsAndProperties.BUNDLE_MARKER_PREFIX) I know if its a BundleMarker
now there can be Markers with SERVICE_MARKER_PREFIX in the graph - whats the recommanded way to get them all: using the iterator ?
thx
ekke
-- Ceki Gülcü Logback: The reliable, generic, fast and flexible logging framework for Java. http://logback.qos.ch

Ceki Gulcu schrieb:
Hello Ekke,
What is it that you are trying to accomplish, in plain English?
My Logger objects are in each class but I also want to know the OSGI Bundle name from where the log entry comes and - optional - the OSGI Service names from where the event happened I store these names in Markers, so later I can get the information to print them (this was the reason I'm using a custom BundleMarkerConverter and in my Layout I say %bundlemarker) the Bundle is always there If I'm also logging from an OSGI Service I create a Marker as ServiceMarker (there can be more then one ServiceMarkers in some situations) I'm using bundleMarker.add(serviceMarker) so my LogEntry has always one BundleMarker and optional one or more ServiceMarker added to know if its a BundleMarker or ServiceMarker the names have a prefix to distinguish for different situations or different appenders I'm using different MarkerConverter classes to get %bundlemarker, %servicemarker or %bundlewithservicemarker %bundlemarker is always only one name of the OSGI bundle %servicemarker is empty or one or an array of OSGI Service names and %bundlewithservicemarker is a combination of both at the moment I have only written the MarkerConverter class for BundleMarker and all works well now I read about your Marker - graphs and only wanted to ask whats the best to get all ServiceMarkers from the graph to decide if a Marker is a ServiceMarker I have to see if the name starts with a given prefix I hope you understand what I mean ;-) ekke
ekkehard wrote:
I read about the changes with Markers - thanks - I also was thinking about Markers as a tree - now I know its only a graph of connected Markers
following scenario: create a Marker with a Bundle-Name add one or more Marker with Service-Names
then I have a BundleMarkerConverter. Testing marker.getName().startsWith(ConstantsAndProperties.BUNDLE_MARKER_PREFIX) I know if its a BundleMarker
now there can be Markers with SERVICE_MARKER_PREFIX in the graph - whats the recommanded way to get them all: using the iterator ?
thx
ekke

ekkehard wrote:
Ceki Gulcu schrieb:
Hello Ekke,
What is it that you are trying to accomplish, in plain English?
My Logger objects are in each class but I also want to know the OSGI Bundle name from where the log entry comes and - optional - the OSGI Service names from where the event happened
What is the relation between bundles and services? For example, is it true to say that at time t0, bundle b0 offers services s00, s01, s02, bundle b1 offers services s10 and s11, while at a later time t1, bundle b0 offers services s00 and bundle b1 offers services s10, s11 and s12? If the above is true, you could create a marker named B0, S00, S01, S02, B1, S10 and S11. For example, with the following code Marker B0 = MarkerFactory.getMarker("B0"); Marker B1 = MarkerFactory.getMarker("B1"); Marker S00 = MarkerFactory.getMarker("S00"); ... Marker S11 = MarkerFactory.getMarker("S11"); Once the markers are created, you can organize them in a graph, for example as B0.add(S00); B0.add(S01); B0.add(S02); B1.add(S10); B1.add(S11); You can iterate through the references contained in a marker by calling the iterator() method. Thus, if you wish to print the name of a bundle and all the services it contains, you would print the name of the bundle marker and iterate through its service markers (and print their names). If at time t1 the list of services changes, then you can add or remove references to service markers from the bundler markers as appropriate. If you are using the default marker factory, keep in mind, in the two lines below, that x0 and x1 refer to the same marker object named X: Marker x0 = MarkerFactory.getMarker("X"); marker x1 = MarkerFactory.getMarker("X"); My point is that, the default marker factory cannot deal with the same bundle markers having two different facets simultaneously depending on the context. For example, you can't assume that the same bundles offers s0 for one request and offers s1 but not s0 for a another request occurring at the same time. This may be a totally obvious and acceptable restriction to you. I don't know OSGI well enough to tell in advance. Alternatively, you could implement your own Marker implementation and your own marker factory, allowing you to check if a marker is a "bundle marker" or a "service marker" or some other type. You could iterate only though bundle markers or only through service markers. As long as the markers you pass to logback implement the org.slf4j.Marker interface, logback does not care. HTH, -- Ceki Gülcü Logback: The reliable, generic, fast and flexible logging framework for Java. http://logback.qos.ch

Ceki Gulcu schrieb:
ekkehard wrote:
Ceki Gulcu schrieb:
Hello Ekke,
What is it that you are trying to accomplish, in plain English?
My Logger objects are in each class but I also want to know the OSGI Bundle name from where the log entry comes and - optional - the OSGI Service names from where the event happened
What is the relation between bundles and services? For example, is it true to say that at time t0, bundle b0 offers services s00, s01, s02, bundle b1 offers services s10 and s11, while at a later time t1, bundle b0 offers services s00 and bundle b1 offers services s10, s11 and s12?
If the above is true, you could create a marker named B0, S00, S01, S02, B1, S10 and S11. For example, with the following code
Marker B0 = MarkerFactory.getMarker("B0"); Marker B1 = MarkerFactory.getMarker("B1"); Marker S00 = MarkerFactory.getMarker("S00"); ... Marker S11 = MarkerFactory.getMarker("S11");
Once the markers are created, you can organize them in a graph, for example as
B0.add(S00); B0.add(S01); B0.add(S02); B1.add(S10); B1.add(S11);
You can iterate through the references contained in a marker by calling the iterator() method. Thus, if you wish to print the name of a bundle and all the services it contains, you would print the name of the bundle marker and iterate through its service markers (and print their names).
If at time t1 the list of services changes, then you can add or remove references to service markers from the bundler markers as appropriate.
If you are using the default marker factory, keep in mind, in the two lines below, that x0 and x1 refer to the same marker object named X:
Marker x0 = MarkerFactory.getMarker("X"); marker x1 = MarkerFactory.getMarker("X");
My point is that, the default marker factory cannot deal with the same bundle markers having two different facets simultaneously depending on the context. For example, you can't assume that the same bundles offers s0 for one request and offers s1 but not s0 for a another request occurring at the same time. This may be a totally obvious and acceptable restriction to you. I don't know OSGI well enough to tell in advance.
Alternatively, you could implement your own Marker implementation and your own marker factory, allowing you to check if a marker is a "bundle marker" or a "service marker" or some other type. You could iterate only though bundle markers or only through service markers. As long as the markers you pass to logback implement the org.slf4j.Marker interface, logback does not care.
HTH,
Ceki, thanks - it helps to make it more clear I want to have this functionality of Bundle- and ServiceMarkers, because the OSGI LogServices always have a bundleContext and ServiceReference(s) contained in the LogEntry. If I catch these log entries and route them to LOGBack I dont want to loose them. Also if I'm doing my own logs from my bundles I also want to log the bundle name and names of referenced services now I have some ideas how to solve it best thanks again ekke

ekkehard skrev:
I tried it but got an error:
[INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Failed to resolve artifact.
Missing: ---------- 1) org.slf4j:slf4j-api:jar:1.5.4-SNAPSHOT
Try downloading the file manually from the project website.
First build slf4j from trunk with "mvn install".

Thorbjørn Ravn Andersen schrieb:
ekkehard skrev:
I tried it but got an error:
[INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Failed to resolve artifact.
Missing: ---------- 1) org.slf4j:slf4j-api:jar:1.5.4-SNAPSHOT
Try downloading the file manually from the project website.
First build slf4j from trunk with "mvn install".
thx. normally I'm only using the distributed jars from logback and slf4j. perhaps you can give me the url for the 1.5.4 snapshot needed like http://svn.qos.ch/repos/logback/trunk/ ciao ekke

ekkehard skrev:
normally I'm only using the distributed jars from logback and slf4j. perhaps you can give me the url for the 1.5.4 snapshot needed like
The information you need is at http://slf4j.org/svn.html svn checkout http://svn.slf4j.org/repos/slf4j/trunk

Hello Ekke, If you update your working copy of logback (svn update), you should see that logback now references a released version of SLF4J, namely 1.5.5. However, building SLF4J from svn as Thorbjørn suggest is also an option. Note that the version of logback in the trunk sometimes references a SNAPSHOT version of SLF4J and sometimes are released version which can be confusing initially. (Building SLF4J should be easy, so it's not as bad as it sounds.) Please let us know if you need further information, Thorbjørn Ravn Andersen wrote:
ekkehard skrev:
normally I'm only using the distributed jars from logback and slf4j. perhaps you can give me the url for the 1.5.4 snapshot needed like
The information you need is at
svn checkout http://svn.slf4j.org/repos/slf4j/trunk
-- Ceki Gülcü Logback: The reliable, generic, fast and flexible logging framework for Java. http://logback.qos.ch

thanks ceki - this will help in the future to know how to build logback and slf4j at the moment I have to prepare some other things and the next days no time to test using the builds my origin problem was solved using a Fragment-Bundle with logback-classic as host I just published a new entry in my blog http://ekkes-corner.blogspot.com/2008/10/logging-in-osgi-enterprise-applicat... the next entry will contain informations about the configuration, marker, fragment-bundles etc. ekke Ceki Gulcu schrieb:
Hello Ekke,
If you update your working copy of logback (svn update), you should see that logback now references a released version of SLF4J, namely 1.5.5.
However, building SLF4J from svn as Thorbjørn suggest is also an option. Note that the version of logback in the trunk sometimes references a SNAPSHOT version of SLF4J and sometimes are released version which can be confusing initially. (Building SLF4J should be easy, so it's not as bad as it sounds.)
Please let us know if you need further information,
Thorbjørn Ravn Andersen wrote:
ekkehard skrev:
normally I'm only using the distributed jars from logback and slf4j. perhaps you can give me the url for the 1.5.4 snapshot needed like
The information you need is at
svn checkout http://svn.slf4j.org/repos/slf4j/trunk
-- ekkehard gentz software-architect erp-consultant max-josefs-platz 30, D-83022 rosenheim, germany homeoffice (1+1 VoIP): +49 8031 2068 325 mobile (iPhone): +49 151 19424929 mailto:ekkehard@gentz-software.de homepage: http://www.gentz-software.de opensource: http://ekkehard.org blog (en): http://ekkes-corner.org blog (de): http://ekkes-ecke.org skype: ekke.gentz Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490

Logback supports reconfiguration via JMX. The configureAndWatch method in DOMConfigurator create a separate thread watching for updates. This can cause very significant problems when the hosting application is hot-(re)deployed. Nevertheless, I think it is still possible to support automatic reloading without adding a separate thread. Could you please add a jira issue asking for this feature? Michael wrote:
Hi,
I've been searching in the docs and the mailinglist but it seems like Logback does not support a reconfiguration every x seconds like log4j's DOMConfigurator. Is this feature planned?
Thanks,
Mike
-- Ceki Gülcü Logback: The reliable, generic, fast and flexible logging framework for Java. http://logback.qos.ch

Ceki Gulcu wrote:
Logback supports reconfiguration via JMX. The configureAndWatch method in DOMConfigurator create a separate thread watching for updates. This can cause very significant problems when the hosting application is hot-(re)deployed.
Nevertheless, I think it is still possible to support automatic reloading without adding a separate thread. Could you please add a jira issue asking for this feature?
Just did: http://jira.qos.ch/browse/LBCORE-59 -- <NO> OOXML - Say NO To Microsoft Office broken standard http://www.noooxml.org
participants (4)
-
Ceki Gulcu
-
ekkehard
-
Michael
-
Thorbjørn Ravn Andersen