[Zope-Coders] new zLOG

Casey Duncan casey@zope.com
Mon, 25 Nov 2002 11:37:23 -0500


On Monday 25 November 2002 11:32 am, Chris McDonough wrote:
> On Mon, 2002-11-25 at 11:11, Toby Dickenson wrote:
> > On Monday 25 November 2002 2:53 pm, Chris McDonough wrote:
> > > Yes, it is intentional.. sorry I should have mentioned this and mad=
e it
> > > explicit in the changelog.  If "import zLOG" potentially causes a f=
ile
> > > to be written, it is difficult to control when it is "safe" to impo=
rt.
> > > Can you live with this?
> >=20
> > The most unsafe thing it does is creating an empty log file when none=
=20
> > previously existed. That seems safe enough to me.
> >=20
> > In most cases the log file will already exist, and there is no on-dis=
k=20
change.=20
> > right?
>=20
> Having an import have the side effect of writing a file causes problems
> when you have a process which needs to setuid after importing zLOG as
> root.  The log file is written as root (which it shouldn't be) and the
> effective user is only able to write to the log for as long as the file
> stays open.  Suggestions?
>=20
> - C

Could you defer the actual opening of the file until the first call to LO=
G is=20
made?

-Casey