need help with logging...

View: New views
4 Messages — Rating Filter:   Alert me  

need help with logging...

by Peter Litvak-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi All,

It seems to be pretty simple to configure but for some reason it just doesn't work for me.

Here is my logback config (pretty much a copy from olfaDemo).
---
<configuration>

    <contextName>audioconverter</contextName>

    <jmxConfigurator contextName="audioconverter"/>

    <appender name="AC" class="ch.qos.logback.core.FileAppender">
        <File>log/audioconverter.log</File>
        <Append>false</Append>
        <Encoding>UTF-8</Encoding>
        <BufferedIO>false</BufferedIO>
        <ImmediateFlush>true</ImmediateFlush>
        <layout class="ch.qos.logback.classic.PatternLayout">
            <Pattern>
                %date [%thread] %-5level %logger{35} - %msg%n
            </Pattern>
        </layout>
    </appender>
    <root>
        <level value="DEBUG"/>
        <appender-ref ref="AC"/>
    </root>
    <logger name="com.xxx.red5.ac">
        <level value="DEBUG"/>
        <appender-ref ref="AC" />
    </logger>
</configuration>
---

In the adapter class I have the following code:
---
package com.xxx.red5.ac;

import org.red5.server.adapter.ApplicationAdapter;

public class AudioConverterAdapter extends ApplicationAdapter
{
    @Override
    public boolean appStart( final IScope app )
    {
        log.debug( "AudioConverterAdapter logging test" );

        return super.appStart( app );
    }
}
---

The log file audioconverter.log gets created but the only string in it is:
2009-11-02 14:33:34,381 [main] DEBUG root - Starting up context audioconverter

Any suggestions on what am I missing here? It is quite strange.

Thanks

_______________________________________________
Red5 mailing list
Red5@...
http://osflash.org/mailman/listinfo/red5_osflash.org

Re: need help with logging...

by Mondain :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Looks like everything is ok, but the only things your not stating are the name of the logback config and the app itself. I have to assume your app name is "audioconverter" thus this directory should exist
red5/webapps/audioconverter
and under this directory
red5/webapps/audioconverter/WEB-INF/classes
there should be a file named 
logback-audioconverter.xml
If not then there is your issue.

Paul

On Mon, Nov 2, 2009 at 11:36 AM, Peter Litvak <plitwak@...> wrote:
Hi All,

It seems to be pretty simple to configure but for some reason it just doesn't work for me.

Here is my logback config (pretty much a copy from olfaDemo).
---
<configuration>

    <contextName>audioconverter</contextName>

    <jmxConfigurator contextName="audioconverter"/>

    <appender name="AC" class="ch.qos.logback.core.FileAppender">
        <File>log/audioconverter.log</File>
        <Append>false</Append>
        <Encoding>UTF-8</Encoding>
        <BufferedIO>false</BufferedIO>
        <ImmediateFlush>true</ImmediateFlush>
        <layout class="ch.qos.logback.classic.PatternLayout">
            <Pattern>
                %date [%thread] %-5level %logger{35} - %msg%n
            </Pattern>
        </layout>
    </appender>
    <root>
        <level value="DEBUG"/>
        <appender-ref ref="AC"/>
    </root>
    <logger name="com.xxx.red5.ac">
        <level value="DEBUG"/>
        <appender-ref ref="AC" />
    </logger>
</configuration>
---

In the adapter class I have the following code:
---
package com.xxx.red5.ac;

import org.red5.server.adapter.ApplicationAdapter;

public class AudioConverterAdapter extends ApplicationAdapter
{
    @Override
    public boolean appStart( final IScope app )
    {
        log.debug( "AudioConverterAdapter logging test" );

        return super.appStart( app );
    }
}
---

The log file audioconverter.log gets created but the only string in it is:
2009-11-02 14:33:34,381 [main] DEBUG root - Starting up context audioconverter

Any suggestions on what am I missing here? It is quite strange.

Thanks

_______________________________________________
Red5 mailing list
Red5@...
http://osflash.org/mailman/listinfo/red5_osflash.org




--
http://gregoire.org/
http://code.google.com/p/red5/
http://code.google.com/p/blue5/

_______________________________________________
Red5 mailing list
Red5@...
http://osflash.org/mailman/listinfo/red5_osflash.org

Re: need help with logging...

by Peter Litvak-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The logback config is in place and has a correct name.

On Monday, November 2, 2009, Mondain <mondain@...> wrote:

> Looks like everything is ok, but the only things your not stating are the name of the logback config and the app itself. I have to assume your app name is "audioconverter" thus this directory should exist
>
> red5/webapps/audioconverter
>
> and under this directoryred5/webapps/audioconverter/WEB-INF/classes
>
> there should be a file named logback-audioconverter.xml
>
> If not then there is your issue.
> Paul
>
> On Mon, Nov 2, 2009 at 11:36 AM, Peter Litvak <plitwak@... <javascript:_e({}, 'cvml', 'plitwak@...');>> wrote:
> Hi All,
>
> It seems to be pretty simple to configure but for some reason it just doesn't work for me.
>
> Here is my logback config (pretty much a copy from olfaDemo).
> ---
> <configuration>
>
>     <contextName>audioconverter</contextName>
>
>     <jmxConfigurator contextName="audioconverter"/>
>
>     <appender name="AC" class="ch.qos.logback.core.FileAppender">
>         <File>log/audioconverter.log</File>
>         <Append>false</Append>
>         <Encoding>UTF-8</Encoding>
>         <BufferedIO>false</BufferedIO>
>         <ImmediateFlush>true</ImmediateFlush>
>         <layout class="ch.qos.logback.classic.PatternLayout">
>             <Pattern>
>                 %date [%thread] %-5level %logger{35} - %msg%n
>             </Pattern>
>         </layout>
>     </appender>
>     <root>
>         <level value="DEBUG"/>
>         <appender-ref ref="AC"/>
>     </root>
>     <logger name="com.xxx.red5.ac">
>         <level value="DEBUG"/>
>         <appender-ref ref="AC" />
>     </logger>
> </configuration>
> ---
>
> In the adapter class I have the following code:
> ---
> package com.xxx.red5.ac;
>
> import org.red5.server.adapter.ApplicationAdapter;
>
> public class AudioConverterAdapter extends ApplicationAdapter
> {
>     @Override
>     public boolean appStart( final IScope app )
>     {
>         log.debug( "AudioConverterAdapter logging test" );
>
>         return super.appStart( app );
>     }
> }
> ---
>
> The log file audioconverter.log gets created but the only string in it is:
> 2009-11-02 14:33:34,381 [main] DEBUG root - Starting up context audioconverter
>
> Any suggestions on what am I missing here? It is quite strange.
>
> Thanks
>
> _______________________________________________
> Red5 mailing list
> Red5@... <javascript:_e({}, 'cvml', 'Red5@...');>
> http://osflash.org/mailman/listinfo/red5_osflash.org
>
>
>
> --
> http://gregoire.org/
> http://code.google.com/p/red5/
> http://code.google.com/p/blue5/
>
>

_______________________________________________
Red5 mailing list
Red5@...
http://osflash.org/mailman/listinfo/red5_osflash.org

Re: need help with logging...

by Nick de Groot :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I also have this problem but when I do

Red5Logger.getLogger(Application.class, "app");
(I don't know what the classes are but I'm using the red5 log factory)

And my logback defines as name app it will log the messages to the log.

When I don't define the appname it will not log.

  How to log without the need to define the logname?

Verstuurd vanaf mijn iPhone

Op 3 nov 2009 om 02:11 heeft Peter Litvak <plitwak@...> het  
volgende geschreven:\

> The logback config is in place and has a correct name.
>
> On Monday, November 2, 2009, Mondain <mondain@...> wrote:
>> Looks like everything is ok, but the only things your not stating  
>> are the name of the logback config and the app itself. I have to  
>> assume your app name is "audioconverter" thus this directory should  
>> exist
>>
>> red5/webapps/audioconverter
>>
>> and under this directoryred5/webapps/audioconverter/WEB-INF/classes
>>
>> there should be a file named logback-audioconverter.xml
>>
>> If not then there is your issue.
>> Paul
>>
>> On Mon, Nov 2, 2009 at 11:36 AM, Peter Litvak <plitwak@...  
>> <javascript:_e({}, 'cvml', 'plitwak@...');>> wrote:
>> Hi All,
>>
>> It seems to be pretty simple to configure but for some reason it  
>> just doesn't work for me.
>>
>> Here is my logback config (pretty much a copy from olfaDemo).
>> ---
>> <configuration>
>>
>>     <contextName>audioconverter</contextName>
>>
>>     <jmxConfigurator contextName="audioconverter"/>
>>
>>     <appender name="AC" class="ch.qos.logback.core.FileAppender">
>>         <File>log/audioconverter.log</File>
>>         <Append>false</Append>
>>         <Encoding>UTF-8</Encoding>
>>         <BufferedIO>false</BufferedIO>
>>         <ImmediateFlush>true</ImmediateFlush>
>>         <layout class="ch.qos.logback.classic.PatternLayout">
>>             <Pattern>
>>                 %date [%thread] %-5level %logger{35} - %msg%n
>>             </Pattern>
>>         </layout>
>>     </appender>
>>     <root>
>>         <level value="DEBUG"/>
>>         <appender-ref ref="AC"/>
>>     </root>
>>     <logger name="com.xxx.red5.ac">
>>         <level value="DEBUG"/>
>>         <appender-ref ref="AC" />
>>     </logger>
>> </configuration>
>> ---
>>
>> In the adapter class I have the following code:
>> ---
>> package com.xxx.red5.ac;
>>
>> import org.red5.server.adapter.ApplicationAdapter;
>>
>> public class AudioConverterAdapter extends ApplicationAdapter
>> {
>>     @Override
>>     public boolean appStart( final IScope app )
>>     {
>>         log.debug( "AudioConverterAdapter logging test" );
>>
>>         return super.appStart( app );
>>     }
>> }
>> ---
>>
>> The log file audioconverter.log gets created but the only string in  
>> it is:
>> 2009-11-02 14:33:34,381 [main] DEBUG root - Starting up context  
>> audioconverter
>>
>> Any suggestions on what am I missing here? It is quite strange.
>>
>> Thanks
>>
>> _______________________________________________
>> Red5 mailing list
>> Red5@... <javascript:_e({}, 'cvml', 'Red5@...');>
>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>
>>
>>
>> --
>> http://gregoire.org/
>> http://code.google.com/p/red5/
>> http://code.google.com/p/blue5/
>>
>>
>
> _______________________________________________
> Red5 mailing list
> Red5@...
> http://osflash.org/mailman/listinfo/red5_osflash.org

_______________________________________________
Red5 mailing list
Red5@...
http://osflash.org/mailman/listinfo/red5_osflash.org