Overview
Features
Download
Documentation
Community
Add-Ons & Services

Logfile permission that logger class makes.

Please post support and help requests here.

Logfile permission that logger class makes.

Postby shinshin » 27 Apr 2009, 09:53

Now I used POCO::Logger Class.
It's class is a good way, but creating log file's permission is always "640".

Can this permission be changed? Or, it can't be changed?
shinshin
 
Posts: 7
Joined: 12 Mar 2009, 12:00

Re: Logfile permission that logger class makes.

Postby alex » 27 Apr 2009, 11:59

shinshin wrote:Can this permission be changed? Or, it can't be changed?

Use umask.
alex
 
Posts: 1120
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: Logfile permission that logger class makes.

Postby shinshin » 30 Apr 2009, 05:02

Thanks, and I'm sorry that the reply slows.

I understood, but is there the option to change permmision into the logger class ?
Even if the 'umask' is used, is it OK to lotate log?
shinshin
 
Posts: 7
Joined: 12 Mar 2009, 12:00

Re: Logfile permission that logger class makes.

Postby alex » 01 May 2009, 19:43

shinshin wrote:I understood, but is there the option to change permmision into the logger class ?


No. There are File::setWritable() and File::setReadOnly(), but they are (1) not asccessible through Logging package interface and (2) platform-independent, hence quite coarse (for example, on POSIX, they bulk-operate on all three r/w flags - user, group and everyone)
shinshin wrote:Even if the 'umask' is used, is it OK to lotate log?

umask operates on the process level. Of course, you could shoot yourself in the foot by e.g. setting file read only and try to purge it later.

If anyone would be willing to look into (a) making permissions more fine-grained (while retaining platform independence) and possibly (b) adding a "permissions" property to FileChannel, it could be a nice contribution. Check this page for description and code.
alex
 
Posts: 1120
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: Logfile permission that logger class makes.

Postby shinshin » 08 May 2009, 11:03

Thanks!

After all the logger class does not have method such as "permissions".
I refer the link that had you teach it and create a program.
shinshin
 
Posts: 7
Joined: 12 Mar 2009, 12:00


Return to Support

Who is online

Users browsing this forum: No registered users and 3 guests