Question about logging

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
Phil Pendlebury
Automation Wizard
Posts: 538
Joined: Tue Jan 16, 2007 9:00 am
Contact:

Question about logging

Post by Phil Pendlebury » Sat Nov 17, 2007 8:04 am

Greetings,

I have searched help and the forum but can find no way to do this. In the help it says that to enable logging you must use the Macro Properties Window.

This works fine and creates a log in the given directory etc.

However, the script I want to log is distributed as an .exe file. I can find no way to add logging info to my macro.

For example - in the code itself I would like to specify a relative directory where the log file is stored and be able to change the name of the log file depending on certain parameters (e.g. date and time) which i already have as variables.

Have I missed something obvious?
Phil Pendlebury - Linktree

User avatar
Phil Pendlebury
Automation Wizard
Posts: 538
Joined: Tue Jan 16, 2007 9:00 am
Contact:

Post by Phil Pendlebury » Sat Nov 17, 2007 8:06 am

OK never mind I found it /LOGFILE

I found this command by looking at the tool to make an exe and noticed the command for disabling log file.

It does not appear if you type log file or logging into help.

Sorry.

:oops:
Phil Pendlebury - Linktree

User avatar
Phil Pendlebury
Automation Wizard
Posts: 538
Joined: Tue Jan 16, 2007 9:00 am
Contact:

Post by Phil Pendlebury » Sat Nov 17, 2007 8:15 am

Ok I have tried entering:

Code: Select all

/LOGFILE=%SCRIPT_DIR%\logs\%logfile_var%.log

Code: Select all

Let>LOGFILE=%SCRIPT_DIR%\logs\%logfile_var%.log
into my code...

I am getting no results.

:cry:
Phil Pendlebury - Linktree

User avatar
Phil Pendlebury
Automation Wizard
Posts: 538
Joined: Tue Jan 16, 2007 9:00 am
Contact:

Post by Phil Pendlebury » Sat Nov 17, 2007 8:56 am

OK well I have insert this into a short cut of the macro:

/LOGFILE=%SCRIPT_DIR%\logs\blahblah.log

and it seems to do what I need for now although i do not seem to be able to control the type of logging.

Anyway any further insights into this would be cool.
Phil Pendlebury - Linktree

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Sat Nov 17, 2007 9:32 am

The /LOGFILE parameter is described in the help file under:

Command Line Options
Create Exe

I was able to find it by searching for "log file" in the help file. Strange that nothing came up when you searched.

Command line logging uses the full logging option - equivalent to option 3 - Log start and completion of every step - in Macro Properties.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts