Millard, Andy | 11 Apr 2012 23:44
Favicon

How to set LockingModel in Log4cxx (if possible)

Is LockingModel implemented for log4cxx (0.10.0) as it is for Log4Net ?

 

For example, in RollingFileAppender

 

  <lockingModel type="log4net.Appender.FileAppender+InterProcessLock" />

or

  <lockingModel type="log4net.Appender.FileAppender+MinimalLock" />

 

It doesn’t appear to be working for me. Maybe I have something configured incorrectly but I would like to know if the feature is even enabled before I waste too much time getting it to work.

 

The objective is to permit viewing of an active log file (on Windows) using tools other than Notepad.  WordPad and other editors are failing to open the file because they file is in use. Notepad allows the file to be viewed without any error.

 

If this is not supported in Log4cxx 0.10.0 what are the alternatives?  E.g. suggested code changes to log4cxx itself?  A later release of log4cxx, although I have not found one.

 

Thanks



"Misys" is the trade name for Misys plc (registered in England and Wales). Registration Number: 01360027. Registered office: One Kingdom Street, London W2 6BL, United Kingdom. For a list of Misys group operating companies please go to http://www.misys.com/corp/About_Us/misys_operating_companies.html. This email and any attachments have been scanned for known viruses using multiple scanners. This email message is intended for the named recipient only. It may be privileged and/or confidential. If you are not the named recipient of this email please notify us immediately and do not copy it or use it for any purpose, nor disclose its contents to any other person. This email does not constitute the commencement of legal relations between you and Misys plc. Please refer to the executed contract between you and the relevant member of the Misys group for the identity of the contracting party with which you are dealing.

 

Chhavi Agarwal | 12 Apr 2012 00:30
Picon

AUTO: Chhavi Agarwal is out of the office (returning 04/16/2012)


I am out of the office until 04/16/2012.

On Vacation.
Please contact Imran.kazi <at> in.ibm.com ( Imranuddin W Kazi )l for any project
related queries.
If urgent call me 9740335000

Note: This is an automated response to your message  "How to set
LockingModel in Log4cxx (if possible)" sent on 12/4/12 3:14:20.

This is the only notification you will receive while this person is away.

Thorsten Schöning | 12 Apr 2012 11:08
Picon

Re: How to set LockingModel in Log4cxx (if possible)

Guten Tag Millard, Andy,
am Mittwoch, 11. April 2012 um 23:44 schrieben Sie:

> Is LockingModel implemented for log4cxx (0.10.0) as it is for Log4Net ?

No. Why do you think it should be if even the appender name is log4net
specific? :-)

> If this is not supported in Log4cxx 0.10.0 what are the alternatives?
> E.g. suggested code changes to log4cxx itself?  A later release of
> log4cxx, although I have not found one.

Use another Editor to view the file. If Notepad can open the file, the
problem is not with the file locking, because it's locked by the
logging process to be readable by others, but with the editor which
can't open the file unless it is able to get an exclusive lock.
TextPad for example is able to open logfiles in use, too. I don't
think there's any other solution because locking the file by the
logging process to be the only one which can write to the logfile
seems fine and logical to me.

Mit freundlichen Grüßen,

Thorsten Schöning

--

-- 
Thorsten Schöning       E-Mail:Thorsten.Schoening <at> AM-SoFT.de
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon.............030-2 1001-310
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hanover HRB 207 694 - Geschäftsführer: Andreas Muchow

Sven Müller | 20 Apr 2012 16:19
Picon

Usage in embedded Systems

Hi,

is log4cxx suitable for usage in embedded systems?

Regards,
Sven Müller.

Rhosyn | 20 Apr 2012 17:06

Re: Usage in embedded Systems

As ever, it depends on the nature of your embedded platform and your usage of log4cxx :)

We've used log4cxx successfully for a number of years in a Linux based appliance product.

You might well find it less appropriate for your needs if you're targeting an embedded RTOS, for example.



On 20 April 2012 15:19, Sven Müller <sven.mueller <at> uni-oldenburg.de> wrote:
Hi,

is log4cxx suitable for usage in embedded systems?

Regards,
Sven Müller.




Sven Müller | 26 Apr 2012 12:10
Picon

Re: Usage in embedded Systems

Rhosyn wrote:
> As ever, it depends on the nature of your embedded platform and your
> usage of log4cxx :)
> 
> We've used log4cxx successfully for a number of years in a Linux based
> appliance product.
> 
> You might well find it less appropriate for your needs if you're
> targeting an embedded RTOS, for example.
> 
> On 20 April 2012 15:19, Sven Müller <sven.mueller <at> uni-oldenburg.de>
> wrote:
>         Hi,
>         
>         is log4cxx suitable for usage in embedded systems?
>         
>         Regards,
>         Sven Müller. 

In fact, I am targeting an embedded real-time os. Why would there be a
difference to using log4cxx in an embedded "non-real-time" os?

Regards,
Sven Müller.

>         

Ken Sheldon | 26 Apr 2012 14:00
Picon
Favicon

RE: Usage in embedded Systems

I think the assumption is that if you need a real-time OS, then you have a real-time application.

You may need to pay particular attention to the buffering of log messages to ensure your use of logging has no
measurable negative impact on the performance of your real-time application.

-----Original Message-----
From: Sven Müller [mailto:sven.mueller <at> uni-oldenburg.de] 
Sent: Thursday, April 26, 2012 5:10 AM
To: Log4CXX User
Subject: Re: Usage in embedded Systems

Rhosyn wrote:
> As ever, it depends on the nature of your embedded platform and your
> usage of log4cxx :)
> 
> We've used log4cxx successfully for a number of years in a Linux based
> appliance product.
> 
> You might well find it less appropriate for your needs if you're
> targeting an embedded RTOS, for example.
> 
> On 20 April 2012 15:19, Sven Müller <sven.mueller <at> uni-oldenburg.de>
> wrote:
>         Hi,
>         
>         is log4cxx suitable for usage in embedded systems?
>         
>         Regards,
>         Sven Müller. 

In fact, I am targeting an embedded real-time os. Why would there be a
difference to using log4cxx in an embedded "non-real-time" os?

Regards,
Sven Müller.



>         




Gmane