Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Viewing log files on-line

Status
Not open for further replies.

nuke764

IS-IT--Management
Apr 2, 2001
11
US
I have a quick one. Does CF have any way to "convert" a text (log) file into html? What I'd like to do is view the CF logs from the browser without renaming them. Any and help is great.

Thanks
Craig
 
The application.log and server.log are the good ones. I'm not sure what the path is (/opt something on Solaris, with standard installation) but you should be able to get that out of the Administrator. Just use CFFILE to read the log, then print it out. It actually has formatting in it (some <p> tags, mostly) so it's readable. It's not <i>good</i> formatting but it should do the trick!
Code:
<cffile action=&quot;READ&quot; file=&quot;/opt/something/application.log&quot; variable=&quot;applicationlog&quot;>
<cfoutput>#VARIABLES.applicationlog#</cfoutput>
Hope that works, someone else should be able to point out the path if you can't find it (if not I'll get it for you on Monday).
 
for html output use this:

<cfoutput>#HTMLEditFormat(VARIABLES.applicationlog)#</cfoutput>
Sylvano
dsylvano@hotmail.com

&quot;every and each day when I learn something new is a small victory...&quot;
 
Thanks for the input. When I get a chance I'll give it a try.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top