You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "spencer.c" <sp...@gmail.com> on 2007/10/19 15:32:19 UTC

SLF4J Usage

This is only tangentially related to wicket but I'm trying to get SLF4J set
up for my wicket project using the Simplelog, rather than log4j.  Has anyone
else done this successfully?  So far, I've done the following:

In pom.xml, I have the following:
  <dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-api</artifactId>
    <version>1.4.3</version>
    <type>jar</type>
</dependency>
<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-simple</artifactId>
    <version>1.4.3</version>
    <type>jar</type>
</dependency>

I am also using the jetty plugin, ala:
<plugins>
  <plugin>
    <groupId>org.mortbay.jetty</groupId>
    <artifactId>maven-jetty-plugin</artifactId>
  </plugin>
  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <configuration>
      <source>1.6</source>
      <target>1.6</target>
    </configuration>
  </plugin>
</plugins>

I have a simplelog.properties file in /classes, with the following content:
simplelog.logFile = output.log

I get no error messages, but the log file is never created, and it appears
all logging is going straight to the console.  

Anyone see what I'm missing?  If so, thanks in advance!

-- 
View this message in context: http://www.nabble.com/SLF4J-Usage-tf4653167.html#a13294464
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: SLF4J Usage

Posted by "spencer.c" <sp...@gmail.com>.
Wow.  I'm sorry.  Yeah, that was what I thought I was using.  Thanks for
keeping me sane.

For appropriate pom dependencies are below, in case anyone needs them.  They
aren't under the slf4j project or the net/java/dev group.

    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>1.4.3</version>
        <type>jar</type>
    </dependency>
    <dependency>
        <groupId>org.grlea.log</groupId>
        <artifactId>simple-log</artifactId>
        <version>2.0.1</version>
        <type>jar</type>
    </dependency>
    <dependency>
        <groupId>org.grlea.log.adapters</groupId>
        <artifactId>simple-log-slf4j</artifactId>
        <version>2.0.1</version>
        <type>jar</type>
    </dependency>




Philip A. Chapman wrote:
> 
> The "Simple" implementation only knows how to output to console:
> 
> http://www.slf4j.org/api/org/slf4j/impl/SimpleLogger.html
> 
> Perhaps what you want is the Simple-log implementation?
> 
> http://simple-log.dev.java.net/
> 
> On Fri, 2007-10-19 at 06:32 -0700, spencer.c wrote:
>> This is only tangentially related to wicket but I'm trying to get SLF4J
>> set
>> up for my wicket project using the Simplelog, rather than log4j.  Has
>> anyone
>> else done this successfully?  So far, I've done the following:
>> 
>> In pom.xml, I have the following:
>>   <dependency>
>>     <groupId>org.slf4j</groupId>
>>     <artifactId>slf4j-api</artifactId>
>>     <version>1.4.3</version>
>>     <type>jar</type>
>> </dependency>
>> <dependency>
>>     <groupId>org.slf4j</groupId>
>>     <artifactId>slf4j-simple</artifactId>
>>     <version>1.4.3</version>
>>     <type>jar</type>
>> </dependency>
>> 
>> I am also using the jetty plugin, ala:
>> <plugins>
>>   <plugin>
>>     <groupId>org.mortbay.jetty</groupId>
>>     <artifactId>maven-jetty-plugin</artifactId>
>>   </plugin>
>>   <plugin>
>>     <groupId>org.apache.maven.plugins</groupId>
>>     <artifactId>maven-compiler-plugin</artifactId>
>>     <configuration>
>>       <source>1.6</source>
>>       <target>1.6</target>
>>     </configuration>
>>   </plugin>
>> </plugins>
>> 
>> I have a simplelog.properties file in /classes, with the following
>> content:
>> simplelog.logFile = output.log
>> 
>> I get no error messages, but the log file is never created, and it
>> appears
>> all logging is going straight to the console.  
>> 
>> Anyone see what I'm missing?  If so, thanks in advance!
>> 
> -- 
> Philip A. Chapman
>  
> Desktop and Web Application Development:
> Java, .NET, PostgreSQL, MySQL, MSSQL
> Linux, Windows 2000, Windows XP
> 
> 
>  
> 

-- 
View this message in context: http://www.nabble.com/SLF4J-Usage-tf4653167.html#a13295527
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: SLF4J Usage

Posted by "Philip A. Chapman" <pc...@pcsw.us>.
The "Simple" implementation only knows how to output to console:

http://www.slf4j.org/api/org/slf4j/impl/SimpleLogger.html

Perhaps what you want is the Simple-log implementation?

http://simple-log.dev.java.net/

On Fri, 2007-10-19 at 06:32 -0700, spencer.c wrote:
> This is only tangentially related to wicket but I'm trying to get SLF4J set
> up for my wicket project using the Simplelog, rather than log4j.  Has anyone
> else done this successfully?  So far, I've done the following:
> 
> In pom.xml, I have the following:
>   <dependency>
>     <groupId>org.slf4j</groupId>
>     <artifactId>slf4j-api</artifactId>
>     <version>1.4.3</version>
>     <type>jar</type>
> </dependency>
> <dependency>
>     <groupId>org.slf4j</groupId>
>     <artifactId>slf4j-simple</artifactId>
>     <version>1.4.3</version>
>     <type>jar</type>
> </dependency>
> 
> I am also using the jetty plugin, ala:
> <plugins>
>   <plugin>
>     <groupId>org.mortbay.jetty</groupId>
>     <artifactId>maven-jetty-plugin</artifactId>
>   </plugin>
>   <plugin>
>     <groupId>org.apache.maven.plugins</groupId>
>     <artifactId>maven-compiler-plugin</artifactId>
>     <configuration>
>       <source>1.6</source>
>       <target>1.6</target>
>     </configuration>
>   </plugin>
> </plugins>
> 
> I have a simplelog.properties file in /classes, with the following content:
> simplelog.logFile = output.log
> 
> I get no error messages, but the log file is never created, and it appears
> all logging is going straight to the console.  
> 
> Anyone see what I'm missing?  If so, thanks in advance!
> 
-- 
Philip A. Chapman
 
Desktop and Web Application Development:
Java, .NET, PostgreSQL, MySQL, MSSQL
Linux, Windows 2000, Windows XP