Removing debug logs

99 views
Skip to first unread message

Cristian Rusu

unread,
Oct 31, 2010, 6:31:54 AM10/31/10
to red5in...@googlegroups.com
Hello

I am trying to port my 0.7 app to 0.9.1 and I am having a problem with all that logs I really don't care about

like this
[NioProcessor-1] DEBUG o.r.server.net.rtmp.RTMPConnection -

How can I prevent logging to Eclipse Console all htis messages with DEBUG or INFO in it?

Thanks

---------------------------------------------------------------
Cristian Rusu
Web Developement & Electronic Publishing

======
Crilance.com
Crilance.blogspot.com

Mondain

unread,
Oct 31, 2010, 3:00:59 PM10/31/10
to red5in...@googlegroups.com
Yes, you can filter the based on level like this; locate your logback.xml file (in red5/conf)
Modify the "CONSOLE" entry

<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>[%p] [%thread] %logger - %msg%n</pattern>
</encoder>
</appender>

To include a filter

<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
             <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
               <level>WARN</level>
             </filter>
<encoder>
<pattern>[%p] [%thread] %logger - %msg%n</pattern>
</encoder>
</appender>


Paul

Cristian Rusu

unread,
Nov 1, 2010, 1:57:27 AM11/1/10
to red5in...@googlegroups.com
Did not help, I'll try to reinstall all the Red5 from sources under my Eclipse and see.

I remember having problems with logging libraries and after many diggings and trying I managed to make it work, unfortunately with that huge logs.
So I am not very sure what is using now for logging or how.

I will reinstall and then maybe you can tell me what should I do if I have same problem setting up logback libraries


---------------------------------------------------------------
Cristian Rusu
Web Developement & Electronic Publishing

======
Crilance.com
Crilance.blogspot.com


Cristian Rusu

unread,
Nov 1, 2010, 8:11:25 AM11/1/10
to red5in...@googlegroups.com
Hello

This is what I did

svn checkout http://red5.googlecode.com/svn/java/server/tags/0_9_1/
Import existing Project into Workspace -> red5 source folder
Open Build.xml and Run/select Ant Build

Now I have two issues
Project 'red5_server' is missing required source folder: 'test'

I just added that test on red5 root and it seems to be the needed (why!?!?)

Now I have 100+ errors
OK, libraries missing: added  Red5.jar and all I found within Lib folder
Now I only have 60 warnings most being

Unsupported @SuppressWarnings("rawtypes")

(My eclipse is old?)

Anyways, now I try to run Bootstrap.java as Application and the issue is:


14:10:11.926 [main] INFO  o.s.b.f.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [red5.xml]
org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [red5.xml]; nested exception is java.io.FileNotFoundException: class path resource [red5.xml] cannot be opened because it does not exist
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:341)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:212)
    at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:126)
    at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:92)
    at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
    at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:458)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:388)
    at org.red5.server.Launcher.launch(Launcher.java:62)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.red5.server.Bootstrap.bootStrap(Bootstrap.java:135)
    at org.red5.server.Bootstrap.main(Bootstrap.java:50)
Caused by: java.io.FileNotFoundException: class path resource [red5.xml] cannot be opened because it does not existBootstrap complete

    at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:141)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:328)
    ... 17 more



{here goes my brain splashed on the wall}

please help with wall cleaning



---------------------------------------------------------------
Cristian Rusu
Web Developement & Electronic Publishing

======
Crilance.com
Crilance.blogspot.com


Dominick Accattato

unread,
Nov 1, 2010, 1:47:03 PM11/1/10
to red5in...@googlegroups.com
You can't run bootstrap.java from within the eclipse project. The reason is that the conf directory is inside the src directory so it is not directly in the classpath. This can be fixed by setting up the classpath differenctly, but there are more common ways of running Red5. Are you trying to just build a distribution? Have you watched my video series yet?


could help you.. please subscribe!

Cristian Rusu

unread,
Nov 1, 2010, 1:57:11 PM11/1/10
to red5in...@googlegroups.com
Hello

What I am trying to do is to take the latest stable release 0.9.1 and install into my eclipse.
After that I create my own plugin application inside webapps, I already have it working under 0.7 version.

Then I want to work some more on my application not on red5 libs... I am just a user of Red5.

I am having more or less different problems when I try this, every time.

What should I do, is there a step by step starting with d"ownload eclipse from here, this version not other etc", checkout red5 from there, add this new software on eclipse and so on..

Basically assuming there is someone that never used the exact environment needed for Red5 under eclipse to foresee what types and libs are trivial to include.

Thank you


---------------------------------------------------------------
Cristian Rusu
Web Developement & Electronic Publishing

======
Crilance.com
Crilance.blogspot.com


Dominick Accattato

unread,
Nov 1, 2010, 2:04:35 PM11/1/10
to red5in...@googlegroups.com
While I do see some comments on my series where users have seen issues, I think it's pretty straight forward from step A to Z in regards to what your looking for.

I start by showing how to download/install and run from command line. Then I go into using the Red5Plugin to create Red5 apps. 

Mohamed M. Ali

unread,
Nov 1, 2010, 2:11:05 PM11/1/10
to red5in...@googlegroups.com
Did you follow these steps?


Basically you need to have red5 up and running regardless of eclipse. You can then publish and synchronize your webapp to the red5 server from the Servers tab. Choosing the red5 runtime will add a reference to red5.jar to your project so eclipse won't complain about missing references.

If you have red5 running smoothly then probably you got problems with eclipse configuration. So just check the link above and this one http://trac.red5.org/wiki/Red5Plugin

Regards,
--
Mohamed Ali

Andy Shaules

unread,
Nov 1, 2010, 2:18:57 PM11/1/10
to red5in...@googlegroups.com
Hello,
 
If it becomes required to run red5 from within eclipse, as I recall, you only need to put a copy of the conf folder into the top level of the eclipse project.
 
Andy

Cristian Rusu

unread,
Nov 1, 2010, 2:26:22 PM11/1/10
to red5in...@googlegroups.com
Can I have a setup without red5 plugin?
I tried that and the folders created were not much like the ones I was used to on 0.7.

I subscribed to your videos but I can only see the intro one.. is there a playlist link?


---------------------------------------------------------------
Cristian Rusu
Web Developement & Electronic Publishing

======
Crilance.com
Crilance.blogspot.com


Dominick Accattato

unread,
Nov 1, 2010, 2:29:42 PM11/1/10
to red5in...@googlegroups.com

Cristian Rusu

unread,
Nov 1, 2010, 2:29:39 PM11/1/10
to red5in...@googlegroups.com
Actually I tried that to the point red5 was running by itself.
But then I had problems publishing my app under it.
The folder structure created by the wizard is confusing to me.
There used to be /webapps/myapp/WEB-INF

Now I also hev some sort of web folder, src/ and classes/ are outside, WEB-INF within that folder.
I had no time to follow Red5 development since 0.7, and now I am kind of lost behind.


---------------------------------------------------------------
Cristian Rusu
Web Developement & Electronic Publishing

======
Crilance.com
Crilance.blogspot.com


Cristian Rusu

unread,
Nov 1, 2010, 2:30:51 PM11/1/10
to red5in...@googlegroups.com
much better now :)
Let me have a look


Thanks

---------------------------------------------------------------
Cristian Rusu
Web Developement & Electronic Publishing

======
Crilance.com
Crilance.blogspot.com


Mohamed M. Ali

unread,
Nov 1, 2010, 2:41:10 PM11/1/10
to red5in...@googlegroups.com
In Eclipse, right click on your webapp project, check the Deployment Assembly option. You will find something like this:


/WebContent ---> /
/src --> /WEB-INF/classes

So basically whatever you have inside WebContent (it might have a different name) will go to the webapp folder. This includes any content like html and jsp files and you will find both the WEB-INF folder there with the xml configurations as well as the streams folder.

Whatever you have in the source folder will be compiled and deployed to /WEB-INF/classes.

You might want to add any libraries that your webapp depends on (but not part of red5) to the deployment assembly by making it go to /WEB-INF/lib

Basically publish your application to red5 server and then restart it to get your app reloaded. I'm not sure about 0.7 structure but 0.8 and 0.9 use the same structure used by apache tomcat. So if you are familiar with that you will know how to deal with it.
--
Mohamed Ali

Cristian Rusu

unread,
Nov 1, 2010, 3:11:50 PM11/1/10
to red5in...@googlegroups.com
I will give it a new whirl tomorrow using Red5Plugin to see if I can manage to set up my application under the red5.
I've looked at some videos from Dominick and it seems I did the right thing myself up to putting my own code inside the red5.

It's just so confusing when you try daily all kind of ideas and tutorial and you end up with a mess all over Red5, Eclipse, workspace etc so when things may eventually work, you have no idea how you did it for a next time... anyone got same feeling ? ... ever? :D

0.7 was much simpler when comes to manual install following instructions, since then it evolved to more automatic handling but also you need to know what to push to make it run



---------------------------------------------------------------
Cristian Rusu
Web Developement & Electronic Publishing

======
Crilance.com
Crilance.blogspot.com


Cristian Rusu

unread,
Nov 2, 2010, 5:37:27 AM11/2/10
to red5in...@googlegroups.com
Hello

So here I am.
I installed red5 plugin and also red5 0.9.1 release from zip.
I managed to configure the server and run.

Then I created a new web dynamic project and placed on work area of my harddisk
I got this folder for web files that I probably don't need in my application ...

It also created for me a src file in app root and I assume there I place my application sources

Next to src/ folder  I have a classes folder.
My java files are all under src/

I get this error

The project was not built since its build path is incomplete. Cannot find the class file for org.apache.mina.core.buffer.IoBuffer. Fix the build path then try building this project

Where can I find such lib and where should I put it inside my application?


Thanks



---------------------------------------------------------------
Cristian Rusu
Web Developement & Electronic Publishing

======
Crilance.com
Crilance.blogspot.com


Cristian Rusu

unread,
Nov 2, 2010, 5:47:26 AM11/2/10
to red5in...@googlegroups.com
Update:
I added the lib I found under red5 to my build path and I am getting another errors now

Question: Do I have to add all libraries from Red5/lib to my app lib path?
Is there any setting I am still missing since my app suppose to run under red5?


---------------------------------------------------------------
Cristian Rusu
Web Developement & Electronic Publishing

======
Crilance.com
Crilance.blogspot.com


Dominick Accattato

unread,
Nov 2, 2010, 9:15:55 AM11/2/10
to red5in...@googlegroups.com
Cristian:

When you use the Red5 Plugin, you create server configurations. Once a project is added to a server configuration, it then has what is called a Red5 facet. This means that the Red5.jar is automatically added to the build path. However, if your application uses any other dependencies such as IOBuffer etc.. you will need to add those libs to your build path. Simply, you can add all of the libs in the Red5/lib directory although it is only necessary to add the dependencies that your project has.

Cristian Rusu

unread,
Nov 2, 2010, 10:16:26 AM11/2/10
to red5in...@googlegroups.com
Hello

I did that and I have some warnings that they may not be included/published.
Should I ignore that since the application will run under red5 webapps on server?

---------------------------------------------------------------
Cristian Rusu
Web Developement & Electronic Publishing

======
Crilance.com
Crilance.blogspot.com


Cristian Rusu

unread,
Nov 2, 2010, 10:34:59 AM11/2/10
to red5in...@googlegroups.com
On another note, I managed to make the application I have running again, for 0.9.1 Woohooo

I am getting this when closing a flash client

[ERROR] [NioProcessor-1] org.red5.server.BaseConnection - Error while disconnecting from scope: [Scope@1d262f7c Depth = 2, Path = '/default/live', Name = 'Crirus_Channel']. java.lang.NullPointerException

Is it just because of forced disconnect (browser closed)? Is there another way?



---------------------------------------------------------------
Cristian Rusu
Web Developement & Electronic Publishing

======
Crilance.com
Crilance.blogspot.com


Cristian Rusu

unread,
Nov 2, 2010, 11:10:41 AM11/2/10
to red5in...@googlegroups.com
Disregard last error, it seems to be gone now. I think I had some SOs blocked by a java instance.

How do I put my application on the production server when it's ready?

I can see under webapps in red5 that it creates a folder for my app('live') and inside that there's a lib with my app jar.

Should I move folder 'live' to Linux server with all content? I develop under Windows :P.



---------------------------------------------------------------
Cristian Rusu
Web Developement & Electronic Publishing

======
Crilance.com
Crilance.blogspot.com


Dominick Accattato

unread,
Nov 2, 2010, 11:19:42 AM11/2/10
to red5in...@googlegroups.com
correct, each folder under webapps is a Red5 application.

Cristian Rusu

unread,
Nov 2, 2010, 12:25:44 PM11/2/10
to red5in...@googlegroups.com
Thank you,  you really helped me.
That video about creating application is GOLD, especially considering the fact I had no idea where it's placed once created (org.red5.core)

not trying to abuse you, but what can be the issues with attached? When I start the IDE....
I never touched any file related to ivy


---------------------------------------------------------------
Cristian Rusu
Web Developement & Electronic Publishing

======
Crilance.com
Crilance.blogspot.com


ivy_err.png

Dominick Accattato

unread,
Nov 2, 2010, 12:44:23 PM11/2/10
to red5in...@googlegroups.com
The IVYDe plugin is funny. Have you tried to close and reopen eclipse?

Cristian Rusu

unread,
Nov 2, 2010, 1:42:41 PM11/2/10
to red5in...@googlegroups.com
Many times...

---------------------------------------------------------------
Cristian Rusu
Web Developement & Electronic Publishing

======
Crilance.com
Crilance.blogspot.com


Cristian Rusu

unread,
Nov 2, 2010, 1:46:33 PM11/2/10
to red5in...@googlegroups.com
I downloaded 0.9.1 final ... right? Not svn version. I never built Red5, since it's supposed to be built

---------------------------------------------------------------
Cristian Rusu
Web Developement & Electronic Publishing

======
Crilance.com
Crilance.blogspot.com


Dominick Accattato

unread,
Nov 3, 2010, 11:46:50 AM11/3/10
to red5in...@googlegroups.com
wait, if your not working with the trunk, then there would be no ivy.xml file. In this case, I do not see why that would even pop up. You do not need to resolve anything if you downloaded a previous distribution. They are built from the source trunk and do not require ivy, etc...

Cristian Rusu

unread,
Nov 3, 2010, 1:21:27 PM11/3/10
to red5in...@googlegroups.com
I know, that's why I am confused.
There is no ivy xml but the Eclipse still complain every time I start it.
No big deal, it's harmless, yet it's there.

Regards


---------------------------------------------------------------
Cristian Rusu
Web Developement & Electronic Publishing

======
Crilance.com
Crilance.blogspot.com


Reply all
Reply to author
Forward
0 new messages