Re: creating logs of all actions performed
Re: creating logs of all actions performed
- Subject: Re: creating logs of all actions performed
- From: Graham Sprague <email@hidden>
- Date: Wed, 29 Sep 2004 22:29:35 -0400
Oh crap! Sorry I forgot a part!
Try this instead...
set logEntry to "Starting Up"
do shell script ("echo `date` "&logEntry&" >> /path/to/your.log)
The ">> /path/to/your.log" part says ">>" append to the file
"/path/to/your.log" so you can specify any file you want. If it does
not already exists the append ">>" will create it. If it already
exists it will add lines to the end of whatever file you specify.
On Wed, 29 Sep 2004 13:38:05 -0600, Johnny AppleScript
<email@hidden> wrote:
> Graham, I'm just curious; where, besides the Event Log History, are you able
> to find these log entries to review?
>
> For the original poster, I would have answered thusly:
>
> set message to "anything you want"
> do shell script "logger -is " & quoted form of message
>
> ...and observe the open system.log file in Console.app.
>
> Since many sysadmins frown on writing to system.log, you can instead use
> console.log, but that requires knowing the correct file path and using the
> echo command above in combination with a write command ( >> ); in which case
> you should just use your own logfile. Respond if you need additional info.
>
> But, I suspect that was not the user's intent at all, anyway; I'm just
> guessing, but I think he wants to observe all Apple Events, in which case he
> will want AE Monitor:
>
> (Loading ³Oxalyn Software > Æ Monitor²
> <http://software.oxalyn.com/AEMonitor/>)
>
> HTH -- JA
>
>
>
>
> On 04/09/29 11:54 AM, "Graham Sprague" <email@hidden> wrote:
>
> > you can use "do shell script" command to create a log.
> >
> > You can use it anywhere in your script with one exception, tell blocks
> > for classic apps will not understand it.
> >
> >
> > set logEntry to "Starting Up"
> > do shell script ("echo `date` "&logEntry)
> >
> > set logEntry to "Ended"
> > do shell script ("echo `date` "&logEntry)
> >
> > ----- Original Message -----
> > From: Jasneet Kaur <email@hidden>
> >
> > I need to create logs of all the actions being performed as an apple
> > script is run, that is, not just on error, but in all cases. The log
> > should be made of each and everything that the script does.
> >
> > Kindly help.
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Applescript-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
--
Graham Sprague
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden