When I told Gert Franz from Railo that it was a pity that there was no log viewing option in the Railo admin, he smiled and showed me a log analyzer plugin which he already wrote. "But it's still in development, so we haven't published it yet", he said.
The plugin indeed lacked some options, but not anymore! I added the remaining options, and now made it available to everyone via my extensionProvider.
It shows you the logs from the web admin, ordered by error message, last occurence date, or amount of occurences. And you can off course download the log file.
Installation for one website, or the server context (new!)
Go to your Web or Server admin, click on Extension > Providers, and add the following url:
http://www.railodeveloper.com/ExtensionProvider.cfc
Then, go to Extension > Applications, and install the Log analyzer (web version) or the Log analyzer (global server version) (server version)
Last, you have to logout and login to the admin again, to see the new plugin in the navigation.
Enjoy!
Installer for multiple websites
Someone asked on the mailing list why the plugin could not be installed from within the server admin. For my own servers, that would also be a great option. One installer to rule them all!
So what you now can do, is add the extension provider to the SERVER admin, and then install the Log analyzer installer plugin. This plugin can then install and uninstall the plugin to any web context (website) you want.
Enjoy*2!
Change log
Version 2.2, 4 june 2013: Added View option, to view the log file inline in the admin. Also fixed a bug with Railo 4.0.x: cfdirectory filter attribute doesn't allow pipe character as delimiter anymore. Also updated the styling, so tables look normal again.
Version 2.1, 1 december 2010: added the server Log analyzer plugin. Fixed a bug which occured if the log had an empty error message. Changed some security issues related to allowed paths.
Version 1.1.3, 4-11-2010: fixed a major bug in version 1.1.2: for some reason I can't use private functions in the plugin :-/
Version 1.1.2, 4-11-2010: fixed a bug: the last error of any parsed template was not used/shown.
Version 1.1.1, 4-11-2010:
- fixed error when trying to change the 'rows per page' select box on windows
- improved file parsing: sometimes new errors were skipped or appended to the previous error "detail output"
- html formatting in the error message and detail is now escaped with htmlEditFormat()
- chart on the detail page now hopefully only shows integers
- chart is only shown if there is more then one occurence date
- chart x-axis is now sorted correctly on date
- long text without spaces in error detail is now broken into pieces, to prevent the table from running off-screen.
#1 by Aaron Longnion - November 4, 2010 at 4:44 AM
#2 by User - November 4, 2010 at 5:51 AM
My installation failed:
error occured in Install.cfc:11
9: <cfargument name="step" type="numeric">
10:
11: <cfif len(config.mixed.lock_timeout) and not IsNumeric(config.mixed.lock_timeout)>
12: <cfset error.fields.lock_timeout="lock timeout must be a positive numeric value greather or equal to 0">
13: </cfif>
#3 by User - November 4, 2010 at 5:53 AM
key [LOCK_TIMEOUT] doesn't exist in struct (keys:)
error occured in Install.cfc:11
9: <cfargument name="step" type="numeric">
10:
11: <cfif len(config.mixed.lock_timeout) and not IsNumeric(config.mixed.lock_timeout)>
12: <cfset error.fields.lock_timeout="lock timeout must be a positive numeric value greather or equal to 0">
13: </cfif>
#4 by AJ Mercer - November 4, 2010 at 10:24 AM
#5 by Paul Klinkenberg - November 4, 2010 at 10:49 AM
#6 by Donal Mulcahy - November 4, 2010 at 11:07 AM
Invalid arguments count for operation GETDOWNLOADDETAILS (5 instead of 4)
#7 by Paul Klinkenberg - November 4, 2010 at 12:14 PM
Also, I think I "fixed" the problem you were having, so you can try it again! But please post the version number; it is important to me to be able to debug this issue.
Kind regards, Paul
#8 by TOm K - November 4, 2010 at 5:21 PM
#9 by Paul Klinkenberg - November 4, 2010 at 5:23 PM
#10 by TOm K - November 4, 2010 at 5:32 PM
Cheers
#11 by Craig Kaminsky - November 4, 2010 at 5:57 PM
Best,
Craig
#12 by david s - November 6, 2010 at 6:13 PM
Haven't looked at your source but i'm assuming you running cfexecute to do this. My setup is on a linux 64bit environment.
http://stackoverflow.com/questions/1124771/how-to-solve-java-io-ioexception-error12-cannot-allocate-memory-calling-runt
#13 by Paul Klinkenberg - November 6, 2010 at 10:56 PM
#14 by Andrew Clarke - November 11, 2010 at 1:36 PM
This is the first time I've tried to use a Railo extension but I'm running into a problem. I added http://www.railodeveloper.com/ExtensionProvider.cfc as an extension, but when I then go to applications, I get the following error: "can't load provider [http://www.railodeveloper.com/ExtensionProvider.cfc]". I then tried to verify your provider, and got the following alt/title tags describing the error: alt="Server returned HTTP response code: 403 for URL: http://www.railodeveloper.com/ExtensionProvider.cfc?wsdl "
This is on Railo 3.1.2.001 on Mac OS X. Any ideas? Thanks, - Andrew.
#15 by Paul Klinkenberg - November 11, 2010 at 1:54 PM
Yesterday, my server got 1.000's of requests from a few ip addresses that were all using the useragent "Java/1.6.0_xx". That's the default user-agent when you call a url from java. Therefor, I locked my server down to stop every request with such a useragent. But guess what? Railo also uses this useragent while retrieving extensionprovider data :-/
Anyway, it's fixed now!
#16 by Andrew Clarke - November 11, 2010 at 3:19 PM
- Andrew.
#17 by Paul Klinkenberg - December 2, 2010 at 12:09 AM
#18 by Tjarko - December 9, 2010 at 10:23 AM
#19 by William Dale - March 16, 2011 at 11:39 PM
Current Headings are as follow: Message, Last occurence, Thread name, Type, Occurences, and Detail.
Could you add url.
I use a query string to support mvc design pattern. So everything goes through index.cfm
Adding full url will help find templates to debug.
Great Work!
-- Bill Dale
#20 by Paul Klinkenberg - March 16, 2011 at 11:57 PM
The information shown with this plugin, is all the information which is available in the log files. So unfortunately, the requested URL is not saved to the log file at the moment of error.
I do think it is an interesting suggestion. What you could do, is make a "feature request" for this in the Railo bug tracking system at https://issues.jboss.org/secure/CreateIssue.jspa?pid=12310683&issuetype=2
If you make it really clear that it would be awesome to have the requested url inside the Detail section of the exception.log file, then you've got a (small) chance that the Railo developers might be so cool to put it in ;-)
What will probably help you more, is to add the tag [cferror] in your Application.cfm, which sends you all error data by email. See Ben's blog post about this: http://www.bennadel.com/blog/932-Ask-Ben-Handling-Errors-With-ColdFusion-CFError.htm
Good luck, Paul
#21 by Sebastiaan - September 22, 2011 at 1:41 PM
Thanx, this works! Would've been nice if it showed up somewhere at the top of the Railo Server Menu, but now I know where it is ;-) Gonna play some with it. Nice addition to the error handling we've built into all sites and apps (sends mail with full error and dumps when something goes awry).
#22 by Paul Klinkenberg - September 22, 2011 at 8:38 PM
Cheers, Paul
#23 by mike fransblow - September 27, 2012 at 7:12 PM
cheers, Mike F
#24 by Dan - March 12, 2013 at 2:40 PM
invalid component definition, can't find railo_plugin_directory.LogAnalyzerInstaller.Action
#25 by Paul Klinkenberg - March 12, 2013 at 2:57 PM
Cheers, Paul
#26 by Michael - June 3, 2013 at 10:14 AM
I'm using RAILO 4.1.0.010 beta and no logs are shown in the web administrator.
(Windows 2003 (5.2) 32bit, Servlet Container Resin/3.1.9).
I've restartet the server, but it seems, that the log analyzer couldn't find any logs.
What could be wrong? Can you give me a hint, where to search?
Thank you for your help
Michael
#27 by Paul - June 3, 2013 at 4:17 PM
Can you check if there are any log files in (web root)/WEB-INF/railo/logs/
Do you get an error in the admin, or is it just an empty list?
Paul
#28 by Michael - June 3, 2013 at 4:49 PM
yes, there are entrys, but they are all to old (date between 2013/03/19 and 2013/06/02).
Is it possible to disable logging? Maybe I've done this ;-)
Michael
#29 by Michael - June 3, 2013 at 5:03 PM
I deleted all log-files and railo created new ones.
Then I created an error-message in my program and railo logged it in application.log and exception.log. But the log analyzer didn't show it.
Thank you for your help
Michael
#30 by Paul Klinkenberg - June 3, 2013 at 9:33 PM
<cfset logsPath = expandpath('/WEB-INF/railo/logs/')/>
<cfdump var="#directorylist(logsPath)#"/>
<cfset fileWrite(logsPath & "testfile.txt", "hi there") />
<cfdump var="#fileRead(logspath & 'testfile.txt')#" />
<cfset fileDelete(logsPath & "testfile.txt") />
If all goes well, you don't get an error on-screen, and the first dump will show you a file listing as an array.
Does that work? On what OS are you running Railo?
Cheers, Paul
#31 by Michael - June 4, 2013 at 9:03 AM
that works very fine:
Array
1 string D:\Inetpub\wwwroot\WEB-INF\railo\logs\application.log
2 string D:\Inetpub\wwwroot\WEB-INF\railo\logs\deploy.log
3 string D:\Inetpub\wwwroot\WEB-INF\railo\logs\exception.log
4 string D:\Inetpub\wwwroot\WEB-INF\railo\logs\gateway.log
5 string D:\Inetpub\wwwroot\WEB-INF\railo\logs\mail.log
6 string D:\Inetpub\wwwroot\WEB-INF\railo\logs\orm.log
7 string D:\Inetpub\wwwroot\WEB-INF\railo\logs\requesttimeout.log
8 string D:\Inetpub\wwwroot\WEB-INF\railo\logs\rest.log
9 string D:\Inetpub\wwwroot\WEB-INF\railo\logs\scheduler.log
10 string D:\Inetpub\wwwroot\WEB-INF\railo\logs\scope.log
11 string D:\Inetpub\wwwroot\WEB-INF\railo\logs\thread.log
12 string D:\Inetpub\wwwroot\WEB-INF\railo\logs\trace.log
string hi there
Railo runs under Windows Server 2003 (5.2) 32bit, Servlet Container Resin/3.1.9
Looks like I haven't disabled anything, which I shouldn't.
Thanks again for your help
Michael
#32 by Paul Klinkenberg - June 4, 2013 at 11:47 PM
There is a new version out, which solves this problem :)
Just go to your Railo admin > Extensions > Applications, and update the Log analyzer.
Cheers, Paul
#33 by Michael - June 5, 2013 at 1:22 PM
thank you for your help. Now it works!!!
Cheers, Michael
#34 by AJ Mercer - June 27, 2014 at 8:48 AM
getting this on railo 4.2
Attribute [codename] for tag [admin] is required if attribute action has the value [UpdateExtensions]
error occured in /railo-context-compiled/admin/extension.applications.install2.cfm:157
called by /railo-context-compiled/admin/extension.applications.cfm:83
called by /railo-context-compiled/admin/web.cfm:377
called by /railo-context-compiled/admin/server.cfm:2
#35 by Paul Klinkenberg - June 27, 2014 at 9:55 AM
I tried to reproduce this on Railo 4.2.1.000 and 4.2.1.002, but alas, it worked ;-)
I see in your msg that you're calling "/railo-context-compiled/", that's not a regular install, or is it? If not, please point me out which codebase/branch you are using.
The error itself seems to be a problem with the Railo admin, not the extension. Or, well, the extension's config.xml has an empty string for the "codename", which used to work, and is kind-of-documented as not required. Something seems to have changed in your codebase, where a value suddenly is required...
If you would, just email me, to keep this comments list clean :) Cheers, Paul
#36 by Martl - January 21, 2015 at 11:05 AM
Railo 4.2.1.008 Error (expression)
Message invalid component definition, can't find component [railo_plugin_directory.LogAnalyzerInstaller.Action]
Stacktrace The Error Occurred in
/railo-context-compiled/admin/plugin.cfm: line 15
called from /railo-context-compiled/admin/web.cfm: line 389
called from /railo-context-compiled/admin/server.cfm: line 2
Java Stacktrace invalid component definition, can't find component [railo_plugin_directory.LogAnalyzerInstaller.Action]
...
don't know if i missed something or its a bug.
thanks for help.
#37 by Paul Klinkenberg - January 21, 2015 at 1:39 PM
The problem you mentioned should be fixable by restarting Railo, either from within the server admin, or Tomcat itself.
If that doesn't help, let me know!
Cheers, Paul
#38 by Michael - March 23, 2015 at 5:32 PM
do you plan to support lucee with your Log analyzer?
I like your tool very much and I'm missing it under lucee.
Cheers, Michael
#39 by Paul Klinkenberg - March 23, 2015 at 7:59 PM
Cheers, Paul
#40 by Paul Klinkenberg - March 23, 2015 at 10:41 PM
https://github.com/paulklinkenberg/lucee-loganalyzer/blob/master/dist/classic/extension.zip?raw=true
After download, go to your lucee admin > Extension > Applications, and use the Upload new extension form.
It will soon be available in the Lucee Applications list as well.
#41 by George Murphy - January 29, 2016 at 7:28 PM
I was able to install this from GitHub. However got this error after clicking the plugins > log analyzer link.
invalid component definition, can't find component [lucee_plugin_directory.Log analyzer.Action]
Stacktrace The Error Occurred in
/context/admin/plugin.cfm: line 14
called from /context/admin/web.cfm: line 389
called from /context/admin/server.cfm: line 2
Java Stacktrace invalid component definition, can't find component [lucee_plugin_directory.Log analyzer.Action]
#42 by Paul Klinkenberg - February 1, 2016 at 11:22 AM
It is something I still want to look into at some point, but never gotten around to do yet.
Kind regards, Paul Klinkenberg
#43 by Dale Marinello - May 24, 2016 at 5:35 PM
file or directory zip://C:/inetpub/wwwroot/WEB-INF/lucee/extensions/843A842C8056372CB80CD57830B66DBE/2.1.2.rep!/config.xml not exist.
Dale
#44 by Jay Bigam - July 7, 2016 at 5:23 PM
"The Extension [C:\lucee\tomcat\lucee-server\deploy\extension-loganalyzerinstaller-2.2.1.35.lex] is invalid,no Manifest file was found at [META-INF/MANIFEST.MF]."
I've really come to rely on this plugin and would love to get it installed in my new 5 instance.
Any ideas?
#45 by Dan Gaspar - November 8, 2016 at 4:24 PM
Is this extension still supported?
When I try to upload the zip file from github in the Lucee Admin under "Upload New Extension" I get the error "The file could not be uploaded. The error:
Only .lex is allowed as extension! "
I'm using Lucee 5.1.0.34
Thanks
#46 by Paul Klinkenberg - November 9, 2016 at 12:22 PM
You can install the plugin by uploading this file in the admin: https://github.com/paulklinkenberg/lucee-loganalyzer/blob/master/dist/modern/extension-loganalyzer-2.3.1.15.lex?raw=true
After upload, you might need to wait half a minute or so, and then either reload Lucee, or append "?alwaysnew=1" to the admin url (/lucee/admin/web.cfm?alwaysnew=1)
Kind regards, Paul Klinkenberg
#47 by Dan Gaspar - January 22, 2018 at 8:20 PM