I have placed a CFLOG inside a CFC function that updates an article, at the very end of the function so that it can log who updated, the title of the article that was updated, and a timestamp.
According to the CF9 documentation, if the named log does not exist it will be created.
I have "updated" an article several times, and it did not create the log. I then went into C:\ColdFusion9\logs and created a file called PAALog.log (the name used in the CFLOG tag.) Updating an article several times, the PAALog.log file still shows a size of 0 and the timestamp has not changed.
Is there an issue with CFLOG? Has anyone else experienced this?
Never had that issue and we use cflog a bit. Are you looking in the correct log directory? Not sure if you are using server or stand-alone. CFLog writes to the log directory where the other ColdFusion logs reside under the WAR (for a server install).
Log into your CF administrator and check if yor log file exists with the other cf logs.
Yes, the logs are located in C:\ColdFusion9\logs. "Updating" an article (basically just loading it into the form and clicking submit) does not create the log; and if I manually create the log in Windows Explorer, it does not update. My install is a stand-alone.
I would have to assume it is some kind of user rights issue. I have never had a problem using cflog. Have you enabled sandbox security? If so, make sure cf has the correct rights. Have you changed the user that is assigned to the cf service? If so, make sure it has the correct rights.
I guess you are not seeing any errors in the other cf logs?
Put a cftry/catch block around your cflog line and see if it generates any errors.
The CF9 is installed to my local dev machine (as opposed to being a network installed dev system that has many people accessing it.) Rights should not be an issue, and I'm not seeing any errors in any Windows 7 logs.
I have not enabled sandbox security, for my CF9 install. I have not changed the user assigned to the CF service. All other CF logs are updating appropriately.
I have shifted focus onto another portion of my project, for now, but when I get back to this, I'll use the CFTRY/CFCATCH and see if anything pops.
As always, thank you for your insight. I'll report back, here, if there are any changes.
Europe, Middle East and Africa