[UPHPU] logging to a file

Brady Mitchell mydarb at gmail.com
Tue Jan 2 16:54:23 MST 2007


Since they don't provide a good way to get the log files, I'd go ahead
and log to a database anyway. As long as it's not against the terms of
service, you shouldn't have a problem. (In my book, "doesn't like"
isn't necessarily the same as "not allowed".)

If database size is a problem, you could setup a cron script to delete
entries older than x days or something to keep the size of the
database down.

Brady


On 1/2/07, Orson Jones <orson.uphpu at bookstore.usu.edu> wrote:
> The reason I am asking this is because the hosting company doesn't like you logging to the database and doesn't provide a good way to get their log files.
>
> > On 12/30/06, Orson Jones <orson.uphpu at bookstore.usu.edu> wrote:
> > >
> > > I was wondering about doing some logging to a file in an application I am
> > > building.
> > >
> > > I am wondering if there are hidden problems with doing something like the
> > > following. (Particularly with simultaneous attempts.)
> > >
> > > $fp = fopen("data.txt", "a");
> > > $fputs($fp, $data);
> > > fclose($fp);
> > >
> > > Are there more reliable ways of doing this, or is it sufficient?
> >
> >
> > When I need this I use syslog.  You have to use openlog (and closelog) but
> > it even works under Windows.  Although, as usual Windows makes you jump
> > through fiery hoops to read the log.
> >
> > --
> > Scott Hill
>
>
> _______________________________________________
>
> UPHPU mailing list
> UPHPU at uphpu.org
> http://uphpu.org/mailman/listinfo/uphpu
> IRC: #uphpu on irc.freenode.net
>


More information about the UPHPU mailing list