3 Replies Latest reply on Sep 10, 2006 10:42 AM by LeftCorner

    CFLog question

    Level 7
      I have the following code:

      <cflog text="Account edit has been made for #Session.Username#"
      file="c:\Inetpub\wwwroot\serenity\Logs\UserAccounts.log" type="information">

      But, in the requested directory, no file called UserAccounts.log is created.

      Am I missing something?


        • 1. Re: CFLog question
          LeftCorner
          <cflog> stores log files at \\CFusionMX7\logs\

          The file attribute is just the name of the log file.

          <cflog text="Account edit has been made for #Session.Username#"
          file="UserAccounts.log" type="information">

          Will create a log file at \\CFusionMX7\logs\UserAccounts.log

          You can then use CF Administrator to view the log file, or <cffile> to fetch if for your application.
          • 2. Re: CFLog question
            Level 7
            Except 1 problem. After adding that code, and running the page, I can't
            find anywhere on the HDD, a file named UserAccounts.log

            Its not in the \\cfusionMX\Logs directory, or anywhere else......

            "LeftCorner" <webforumsuser@macromedia.com> wrote in message
            news:edvl89$r5t$1@forums.macromedia.com...
            > <cflog> stores log files at \\CFusionMX7\logs\
            >
            > The file attribute is just the name of the log file.
            >
            > <cflog text="Account edit has been made for #Session.Username#"
            > file="UserAccounts.log" type="information">
            >
            > Will create a log file at \\CFusionMX7\logs\UserAccounts.log
            >
            > You can then use CF Administrator to view the log file, or <cffile> to
            > fetch
            > if for your application.
            >
            >


            • 3. Re: CFLog question
              LeftCorner Level 1
              There is one problem and one potential problem.

              First is the file extension is not needed, so it should be:

              <cflog text="Account edit has been made for #Session.Username#" file="UserAccounts" type="information">

              Next is that your Session variable is not locked.

              <cflock timeout="5" type="READONLY" scope="SESSION">
              <cflog text="Account edit has been made for #Session.Username#" file="UserAccounts" type="information">
              </cflock>

              However those two problems aside you should have seen a file called UserAccounts.log.log under \CFusionMX7\logs. The only thing I can think of is that the ColdFusion servce does not have write permissions to that directory, which would be strange because it writes its own log files there.