Jump to content
Macro Express Forums

How do I use a variable file name with the Log Errors command?


Cory
 Share

Recommended Posts

I created a simple macro and used the Log Errors command and manually set the file name and it worked, sort of. But when I set a variable to that file name and put that variable in the file name field it does not. Can anyone else verify what appears to be a bug or explain to me what I am not understanding about this command and its usage?

 

Oh, also it seems that the Log Errors command and the option in the Miscellaneous tab are intended to do the same thing and you may have already seen my post about it logging starts and stops but for this command the help file states it will log the start and stop but I am only seeing it log the stop f the macro. Can anyone else confirm this?

Link to comment
Share on other sites

Thanks Bob. I was really hopping to get more response on this but perhaps I'm guilty of the same thing I complain to others about by not making it slam dunk simple to test so I have attached a test macro. No activation so activate it from the explorer or whatever. It will prompt for a folder to put the log and then attempt a division by zero. On my machine it generates no log. I'm more convinced than ever this is a bug but it would be good to have confirmation. Also to make sure I'm just not getting something.

Log_Errors_Test.mex

Link to comment
Share on other sites

Thanks Bob. I was really hopping to get more response on this but perhaps I'm guilty of the same thing I complain to others about by not making it slam dunk simple to test so I have attached a test macro. No activation so activate it from the explorer or whatever. It will prompt for a folder to put the log and then attempt a division by zero. On my machine it generates no log. I'm more convinced than ever this is a bug but it would be good to have confirmation. Also to make sure I'm just not getting something.

 

Cory,

 

I ran your macro which duly reported your deliberate line 6 error. No log file was created.

 

I then changed line #1 to

Log Errors to "C:\Docs\MyTest.log"

and disabled lines 2 and 3 and ran it again, but I still saw no log. Should I? Under Options > Preferences > Playback > Misc I have Log all errors (regardless of individual macro settings) enabled, so I assume so. But as I mentioned in your other thread I've not used logs before in ME3 or ME Pro, so I may be misunderstanding something basic here.

 

I then changed line #1 to

Log Errors to Default Error Log

and ran your macro again, but no log file has appeared in C:\Docs\Insight Software\Macro Express\Macro Logs

 

So it seems that I haven't even got as far as you. When you say "... it worked, sort of," what exactly do you mean?

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

Thanks so much Terry but you're worse off than me! The part where you changed the code and created a specific path for e will create a log with no start macro but a divide by zero and a stop macro. Yeah something is definitely haywire with your setup. Anyway thinks for at least trying!

Link to comment
Share on other sites

I created a simple macro and used the Log Errors command and manually set the file name and it worked, sort of. But when I set a variable to that file name and put that variable in the file name field it does not. Can anyone else verify what appears to be a bug or explain to me what I am not understanding about this command and its usage?

 

Oh, also it seems that the Log Errors command and the option in the Miscellaneous tab are intended to do the same thing and you may have already seen my post about it logging starts and stops but for this command the help file states it will log the start and stop but I am only seeing it log the stop f the macro. Can anyone else confirm this?

Using your example I can confirm that using a variable for the log destination in the Log Errors command does not work. I can also confirm that the Log Errors command is only logging the error that occurred and a "Macro Completed" entry. It does not log "Macro Started" probably because the command can be placed anywhere in a macro and not just at the beginning.

Link to comment
Share on other sites

ISS is looking into it [iSS7545] but it seems to me that it was just an oversight to stick the Variables button in there. Having said that I think it would be a very useful feature to be able to have the log file location a variable. Also it would be cool if it had an email option as well.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...