Skip to main content
Inspiring
May 28, 2014
Answered

Testing success/failure of archiveLogFile() method of servermanager

  • May 28, 2014
  • 1 reply
  • 303 views

When attempting to archive a log file programmatically using the archiveLogFile() method of servermanager is there a way to test the success/failure of the action. I tried

adminObj = createObject("component","cfide.adminapi.administrator").login("topsecret");
serverObj = createObject("component","cfide.adminapi._servermanager.servermanager");
result = serverObj.archiveLogFile("logfilename");
writeDump(result);

However, result is undefined.

Thanks!

This topic has been closed for replies.
Correct answer duncancumming

That function has a void returntype, that's why.

http://www.cfexecute.com/admin-api-documentation/servermanager-cfc/#method_archiveLogFile

Instead you'd have to do something like a directory read to see if the file had been renamed.

1 reply

duncancummingCorrect answer
Participating Frequently
May 28, 2014

That function has a void returntype, that's why.

http://www.cfexecute.com/admin-api-documentation/servermanager-cfc/#method_archiveLogFile

Instead you'd have to do something like a directory read to see if the file had been renamed.