Yeap, however you should remember that if several threads (request) try to
access the file the same time each process will be queued until it gets an
exclusive lock, which might a preformance issue. It might be possible to add
additional loggers to cf for use in cflog, but it would take a little work
to discover the way to do that .... start with the logger.xml file.. .

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration SYSTEM "log4j.dtd">

<configuration>
    <!-- custom log4j appenders can be configured here -->
</configuration>

WG


> Hi,
>   Cflog would be great if it allowed me to specify the complete file path.
> It only allows the file name and put the file in the default log
> directory.
> Not where I want it.
> If I create a custom tag and in that tag put a lock around the
> cffile, will
> that cover me.  I mean if the custom tag is called from multiple pages, is
> it single threaded, or does each tread run its own copy of the tag?
>
> ----- Original Message -----
> From: "webguy" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Wednesday, January 08, 2003 4:54 AM
> Subject: RE: Locking cffile
>
>
> > No cf does not lock the file for you. In fact you'll need to use an
> > exclusive lock. If you are doing alot of logging to file I
> would recommend
> > using the cflog tag. This tag is built on top of log4j which is an open
> > source java based logging lib (http://jakarta.apache.org) It handles
> issues
> > like locking, using optimistic locking and lots more too! If
> cflog doesn't
> > crumble your biscuit, you chould build your own tag using the log4j.
> >
> >
> > WG
> >
> > > -----Original Message-----
> > > From: Webmaster [mailto:[EMAIL PROTECTED]]
> > > Sent: 08 January 2003 05:23
> > > To: CF-Talk
> > > Subject: Locking cffile
> > >
> > >
> > > Anyone know if cffile handles contention/locking for you.  In
> > > other words, I
> > > have an application that logs everything it does to a file.  Lets
> > > say I have
> > > 5 cfm pages in the app.  Each page will do a write to the log
> file.  So,
> > > what if all 5 pages are trying to write to the file at the same time?
> > > (multiple CPUs and threads)  Will cffile handle the contention
> > > for you.  If
> > > not, what do you need to do?  I don't think cflock is the answer..
> > >
> > >
> > >
> > >
> >
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to