Re: Log to file in setenv?

Date : Thu, 16 Aug 2007 12:53:18 -0400
To : XSI(at)Softimage.COM
From : "Bernard Lebel" <3dbernard(at)gmail.com>
Subject : Re: Log to file in setenv?
Well, no. That mean everyone would have the same log and that's
precisely what I DON'T want.

I'm trying to figure out a strategy to handle logs in a way that would
allow me to read them without having to go on the user's computer and
close their XSI. This means storing their content on the server. The
server file would have to be appended upon certain events (new scene,
save, and most importantly, when XSI launches).

So the idea is to have a new log file created every time XSI starts.
To make sure it's not overwriting the last log, a new file name is
specified right before the launch, so a new log file is created, and
with the echo thing, the xsipref file is updated right away instead of
being updated when XSI closes.

Also, another reason to not overwrite the last log is because most
artists here run two or more instances of XSI at a time. For the
additional instances to write something to file, they must have their
own log. This means that logs must have a name garanteed to be unique.




What I have yet to figure out is on the server, I'd like to have only
one log per day per session. That is, if on a day a user ran up to 3
instances of XSI, then there are 3 logs on the server. There are two
main problems with that:

Crashes. I need the content of the log between the last event that
created a new log and the crash. One could say: don't change the log
right away before XSI even launches, so this way you remember what was
the last log file, and instead copy the old log's content to the
server and change the log path with a startup event, naming the new
log with current date-time informations.

We did that for a while, but we ended up having half of the logs on
the server and the other half on the user's computer. With the
second/third instance of XSI, in circumstances I couldn't reproduce so
far, the second instances tries to copy a lot that is used by the
first instance.

The second problem is that if I want to keep only 1-3 logs on the
server, it means the code that appends to the server logs has to know
in what instance of XSI it's being called. After all, if you start 2
instances of XSI, you don't want them to append to the same server
file. Anyway I'm looking into process ids for now, with high
hopes.....



Bernard



On 8/16/07, Luc-Eric Rousseau <lucer(at)softimage.com> wrote:
> wouldn't it be simpler to drop a .xsipref in the workgroup
> folder so that all users get it?
>
>
> > From: Grahame Fuller
> >
> > Yeah, use >> if you want to append to an existing file like
> > default.xsipref.
> >
> > Use > to create/overwrite a different .xsipref file. Like I said, you
> > can have as many as you want and XSI will read them all.
> >
> > gray
> >
> > -----Original Message-----
> > From: owner-xsi(at)Softimage.COM
> > [mailto:owner-xsi(at)Softimage.COM] On Behalf
> > Of Bernard Lebel
> > Sent: Wednesday, August 15, 2007 9:14 PM
> > To: XSI(at)Softimage.COM
> > Subject: Re: Log to file in setenv?
> >
> > Actually this works, although you want to use >> insteand of >. When
> > you run the echo command, the line is added at the end of the file,
> > and is picked by XSI - its preference is changed. But then the file is
> > restored in its original state, until XSI is closed. The extra line is
> > removed.
> >
> >
> > Thanks a lot
> > Bernard
> >
> >
> >
> >
> > On 8/15/07, Grahame Fuller <grahamef(at)softimage.com> wrote:
> > > Sorry, previous mail escaped early.
> > >
> > > You can try something like:
> > >
> > > echo scripting.cmdlogfilename = "logpath\xsilog.txt.log" >
> > > userpath\Data\Preferences\logpath.xsipref
> > >
> > > XSI will always write modified prefs to default.xsipref but
> > on startup
> > > it will read all .xsipref files in the user and factory locations.
> > User
> > > settings take priority over factory settings, but I don't think
> > there's
> > > much control over the order in which multiple files are loaded from
> > > within a single location.
> > >
> > > gray
> > >
> > > -----Original Message-----
> > > From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On
> > Behalf
> > > Of Patrick Boucher
> > > Sent: Wednesday, August 15, 2007 1:10 PM
> > > To: XSI(at)Softimage.COM
> > > Subject: Re: Log to file in setenv?
> > >
> > >
> > > > I know the file default.xsipref contains the path to the log file.
> > > > But I was hoping if there was a way to specify it in setenv.bat?
>
> ---
> Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
> unsubscribe xsi
>
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi


Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.