Jacob L. Anawalt | 1 Oct 2008 22:53

Re: Log4cpp's SyslogAppender problem

On 2008-10-01 12:00, Hoang, Minh-Long (Mission Systems) wrote:
> I'm having problem with log4cpp's SyslogAppender.  

SyslogAppender "works for me" (tm) but I haven't tried 0.10.x

Steps for troubleshooting:

1) Use some other app to make sure your logging setup is correct. I suggest the 
simple command line logger from the bsdutil / util-linux project:

http://freshmeat.net/projects/util-linux/

2) Use some facility that is working and being used by other apps on the system 
before trying some custom LOCAL_X facility. Combining steps 1 and 2 you should 
be very confident that you are watching the right file before moving on to step 3.

3) Write a simple log4cxx test app and try it. The attached one requires no 
external config and works fine on my systems with log4cxx 0.9.7.

--

-- 
Jacob Anawalt
Gecko Software, Inc.
janawalt <at> geckosoftware.com
435-752-8026
// 2008-0ct-01T20:30
// log4cxx example of working with an external process that rotates
// log files and sends SIGHUP to the logging app to tell it to close
// and reopen files.
(Continue reading)

Curt Arnold | 2 Oct 2008 06:16
Picon
Favicon

Re: Log4cpp's SyslogAppender problem


On Oct 1, 2008, at 3:53 PM, Jacob L. Anawalt wrote:

> On 2008-10-01 12:00, Hoang, Minh-Long (Mission Systems) wrote:
>> I'm having problem with log4cpp's SyslogAppender.
>

Are you using log4cpp or Apache log4cxx?  If you are using log4cpp,  
you should go to their mailing list.

Curt Arnold | 4 Oct 2008 18:42
Picon
Favicon

Fwd: CFP open for ApacheCon Europe 2009


Begin forwarded message:

> From: Noirin Shirley <noirin <at> apache.org>
> Date: October 2, 2008 3:22:06 AM CDT
...

> If you only have thirty seconds:
>
> The Call for Papers for ApacheCon Europe 2009, to be held in  
> Amsterdam, from 23rd to 27th March, is now open! Submit your  
> proposals at http://eu.apachecon.com/c/aceu2009/cfp/ before 24th  
> October.
>
> Remember that early bird prices for ApacheCon US 2008, to be held in  
> New Orleans, from 3rd to 7th November, will go up this Friday, at  
> midnight Eastern time!
>
> Sponsorship opportunities for ApacheCon US 2008 and ApacheCon EU  
> 2009 are still available. If you or your company are interested in  
> becoming a sponsor, please contact Delia Frees at  
> delia <at> apachecon.com for details.
>
> *******
>
> If you want all the details:
>
> ApacheCon Europe 2009 - Leading the Wave of Open Source
> Amsterdam, The Netherlands
> 23rd to 27th March, 2009
(Continue reading)

Jathy | 10 Oct 2008 09:02
Picon
Favicon

TimeBasedRollingPolicy does not work in RollingFileAppender


I used TimeBasedRollingPolicy to rollover log file every day but it did not
work. No files was generated. My configuration file is shown below,

<?xml version="1.0" encoding="UTF-8" ?> 
<log4j:configuration xmlns:log4j='http://logging.apache.org/' debug="true">
  <appender name="ROLLING"
class="org.apache.log4j.rolling.RollingFileAppender">
            <rollingPolicy
class="org.apache.log4j.rolling.TimeBasedRollingPolicy">

              
            </rollingPolicy>
    <layout class="org.apache.log4j.PatternLayout">

    </layout>

  </appender>
  <root>
    <level value="info"/>
    <appender-ref ref="ROLLING"/>
  </root>
</log4j:configuration>

And in the code, I used the following codes to initialized the log4cxx:

string strXmlConfig = "logging.xml";
log4cxx::xml::DOMConfigurator::configure(strXmlConfig);
log4cxx::LoggerPtr pLogger = log4cxx::Logger::getRootLogger();

(Continue reading)

Jathy | 10 Oct 2008 11:54
Picon
Favicon

Re: TimeBasedRollingPolicy does not work in RollingFileAppender


Jathy wrote:
> 
> I used TimeBasedRollingPolicy to rollover log file every day but it did
> not work. No files was generated. My configuration file is shown below,
> 
> <?xml version="1.0" encoding="UTF-8" ?> 
> <log4j:configuration xmlns:log4j='http://logging.apache.org/'
> debug="true">
>   <appender name="ROLLING"
> class="org.apache.log4j.rolling.RollingFileAppender">
>             <rollingPolicy
> class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
>               
>               
>             </rollingPolicy>
>     <layout class="org.apache.log4j.PatternLayout">
>       
>     </layout>
>     
>   </appender>
>   <root>
>     <level value="info"/>
>     <appender-ref ref="ROLLING"/>
>   </root>
> </log4j:configuration>
> 
> And in the code, I used the following codes to initialized the log4cxx:
> 
> string strXmlConfig = "logging.xml";
(Continue reading)

Jathy | 10 Oct 2008 12:01
Picon
Favicon

Does TimeBasedRollingPolicy work with MaxBackupIndex?


I used TimeBasedRollingPolicy of RollingFileAppender to rollover log file
every minute. And at the same time I'd like to use MaxBackupIndex to set the
max number of backup files. But MaxBackupIndex does not work.
TimeBasedRollingPolicy cannot work with MaxBackupIndex or my configuration
file has some wrong? I attached my configuration:

<?xml version="1.0" encoding="UTF-8" ?> 
<log4j:configuration xmlns:log4j='http://logging.apache.org/' debug="true">
  <appender name="ROLLING"
class="org.apache.log4j.rolling.RollingFileAppender">
            <rollingPolicy
class="org.apache.log4j.rolling.TimeBasedRollingPolicy">

            </rollingPolicy>

    <layout class="org.apache.log4j.PatternLayout">

    </layout>

  </appender>
  <root>
    <level value="INFO"/>
    <appender-ref ref="ROLLING"/>
  </root>
</log4j:configuration>
--

-- 
View this message in context: http://www.nabble.com/Does-TimeBasedRollingPolicy-work-with-MaxBackupIndex--tp19915414p19915414.html
Sent from the Log4cxx - Users mailing list archive at Nabble.com.

(Continue reading)

Dale King | 11 Oct 2008 17:30
Picon

Re: Does TimeBasedRollingPolicy work with MaxBackupIndex?

I thought we already went over this. No, you cannot use both of them together. Think about how this would work. When log4cxx rolls over, how it would it figure out files that it should delete. Anything you come up with will be a hack and not reliable. For SizeBasedRollingPolicy it has an easy way to figure out which files to delete. There is a file name pattern where it deletes the one with the max backup index in the filename and renames the others one number higher. There is no easy way to do this with time based rolling.


On Fri, Oct 10, 2008 at 6:01 AM, Jathy <xuehai.fan <at> yahoo.com> wrote:

I used TimeBasedRollingPolicy of RollingFileAppender to rollover log file
every minute. And at the same time I'd like to use MaxBackupIndex to set the
max number of backup files. But MaxBackupIndex does not work.
TimeBasedRollingPolicy cannot work with MaxBackupIndex or my configuration
file has some wrong? I attached my configuration:

<?xml version="1.0" encoding="UTF-8" ?>
<log4j:configuration xmlns:log4j='http://logging.apache.org/' debug="true">
 <appender name="ROLLING"
class="org.apache.log4j.rolling.RollingFileAppender">
           <rollingPolicy
class="org.apache.log4j.rolling.TimeBasedRollingPolicy">

           </rollingPolicy>

   <layout class="org.apache.log4j.PatternLayout">

   </layout>

 </appender>
 <root>
   <level value="INFO"/>
   <appender-ref ref="ROLLING"/>
 </root>
</log4j:configuration>
--
View this message in context: http://www.nabble.com/Does-TimeBasedRollingPolicy-work-with-MaxBackupIndex--tp19915414p19915414.html
Sent from the Log4cxx - Users mailing list archive at Nabble.com.




--
Dale King
Habdank-wojewodzki Seweryn | 14 Oct 2008 11:12
Favicon

log4cxx::net::XMLSocketNode


Hi,

What "class" can be used in log4cxx 0.10.0
instead of log4cxx::net::XMLSocketNode from 0.9.7.

I have a code, which receives packets from XMLSocketHubAppender
or XMLSocketAppender and the code work on them.

Regards,
Seweryn Habdank-Wojewodzki

Ernesto Cullen | 21 Oct 2008 14:24
Picon
Favicon

is it possible to log to the same file from log4cxx and log4net?

hi all,
    i have to log from two parts of the same application -one writen in
c++, the other in c#. We are using log4cxx in c++ section, and i would
like to add to the same file from c# module so i configured log4net to
use the same file (both using a RollingFile Appender). But i can't get
my .net messages into the file. I don't get any messages, but i have
stopped c++ logging and was able to see the messages from c# so i know
it works.
    I think it is a locking issue. I came into MinimalLock configuration
setting for log4net, but it seems that there is no correlative in log4cxx.

Does anybody knows if this cross-logging could be achieved? and if so,
how? Is there a config parameter or command to control the locking in
log4cxx?

Thanks in advance

Ernesto Cullen

Stefan.Borovac@t-online.de | 29 Oct 2008 15:40
Picon
Favicon

LOGCXX-282 patch

Hi,

I see issues as described in LOGCXX-282. Will there be a release
containing
the patch soon?? Afaik, the patch isn't in the trunk, is it?

I need log4cxx in productivity on remote mashines, thus it should work
deterministic.

Cheers
  Stefan


Gmane