red5 v0.9:如何将信息记录到日志文件?

发布于 2024-08-16 16:59:48 字数 850 浏览 2 评论 0原文

我正在阅读本教程,了解如何使用 eclipse 和 red5 eclipse 插件构建我的项目项目。问题是本教程适用于 0.6 版本,而我有 0.9 版本。

教程位于: http://www.actionscript.org/resources/articles/615/1/Getting-started-with-red5-server/Page1.html actionscript.org/resources/articles/615/1/Getting-started-with-red5-server/Page1.html

在第 2 页,该教程解释了如何使用以下导入的类将信息记录到日志文件:

import org.apache.commons.logging.Log; 
import org.apache.commons.logging.LogFactory; 

然后教程解释了将 jar red5/lib/commons-logging-1.1.jar 添加到 eclipse 的构建路径,但问题是该文件不存在。

包含单词 log 的唯一 jar 文件是:

  1. log4j-over-slf4j-1.5.8.jar
  2. logback-classic-0.9.17.jar
  3. logback-core-0.9.17.jar

我到底要做什么来使用 red5 0.9 进行日志记录? 谢谢!

I'm reading this tutorial on how to build my project project using eclipse with the red5 eclipse plugin. the problem is that this tutorial is for version 0.6 and i have version 0.9.

the tutorial is at:
http://www.actionscript.org/resources/articles/615/1/Getting-started-with-red5-server/Page1.html

On page 2 that tutorial explains about logging information to the log file using the following imported classes:

import org.apache.commons.logging.Log; 
import org.apache.commons.logging.LogFactory; 

then the tutorial explains to add the jar red5/lib/commons-logging-1.1.jar to the
build path of eclipse but the problem is that this file does not exist.

the only jar files that contain the word log are:

  1. log4j-over-slf4j-1.5.8.jar
  2. logback-classic-0.9.17.jar
  3. logback-core-0.9.17.jar

what exactly do i do to log using red5 0.9 ?
thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

顾挽 2024-08-23 16:59:48

确保您有该文件夹
Program Files\Red5\logs

在该文件夹中,您现在在 java 中放置一个名为 red5.log 的空文件

,每次您想要在日志文件中写入一行时,您都会编写

log.error( "Your description ");

如果要将变量传递到日志文件(以查看值)

log.error( "reading file : " + filename );

所有这些都不需要任何类型的进口。 Red5 日志记录已经在那里了!

make sure you have the folder
Program Files\Red5\logs

in that folder you place an empty file called red5.log

now in your java, every time you want a line to be written in your logfile you write

log.error( "Your description ");

if you want to pass variables to the logfile (to see the value)

log.error( "reading file : " + filename );

All of this does not need imports of any kind. Red5 logging is already in there !

维持三分热 2024-08-23 16:59:48

好的 red5 0.9 只使用 log4j。
需要导入 import org.apache.log4j.Logger;将 log4j-over-slf4j-1.5.8.jar 添加到 eclipse 中的外部 jar 列表后。

很好的 log4j 教程:
http://www.laliluna.de/log4j-tutorial.html

ok red5 0.9 just uses log4j.
needed to import import org.apache.log4j.Logger; after adding log4j-over-slf4j-1.5.8.jar to the external jars list in eclipse.

good log4j tutorial:
http://www.laliluna.de/log4j-tutorial.html

铁憨憨 2024-08-23 16:59:48

Red5 网站上的这个链接提供了一些更详细的说明,以便获取日志记录使用 Red5 服务器版本 0.9。

This link from the Red5 website provides some more detailed instructions in order to get logging working with version 0.9 of the Red5 server.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文