Apr 07 2012

Zero overhead Client-Side error logging with Apache

Tag: datawiki,foswiki,javascript,new,twiki,twikifork,wikiSven Dowideit @ 4:24 pm

Thanks to a tweet by a Brisbane local (Bruce) I was continuing to mull the disconnect I have from external web traffic tracking tools. I prefer to reduce the number of requests needed to serve my users – and zero requests are always fastest.

I’ve been messing with Apache CustomLog formats to debug session and performance issues in foswiki, and so given a hammer, wondered why not apply it to more things.

Then comes Bruce’s link to Client-Side Error Logging With Google Analytics, a continuation of You Really Should Log Client-Side Errors – and I wondered…

What if I put the client error into the next user request made to the server?

the javascript:

function logError(details) {
    $.cookie('clientError', details);
}
window.onerror = function(message, file, line) {
  logError(file + ':' + line + '\n\n' + message);
};
$(document).ajaxError(function(e, xhr, settings) {
  logError(settings.url + ':' + xhr.status + '\n\n' + xhr.responseText);
});
$.cookie('clientError', null);

the apache CustomLog settings:

#add a Client Error log
 LogFormat  "%h %l \"%r\" %u %t %>s %{clientError}C" clientError
 CustomLog ${APACHE_LOG_DIR}/clientError_local_log clientError

and the result:

192.168.1.51 - "GET /~sven/core/pub/System/JQueryPlugin/plugins/foswiki/jquery.foswiki.js?version=2.01 HTTP/1.1" - [07/Apr/2012:16:18:26 +1000] 304 -
 192.168.1.51 - "GET /~sven/core/pub/System/TwistyPlugin/jquery.twisty.js?version=1.6.0 HTTP/1.1" - [07/Apr/2012:16:18:26 +1000] 304 -
 192.168.1.51 - "GET /~sven/core/bin/view/Sandbox/TestClientSideLogging HTTP/1.1" - [07/Apr/2012:16:18:31 +1000] 200 http%3A%2F%2F192.168.1.51%2F~sven%2Fcore%2Fbin%2Fview%2FSandbox%2FTestClientSideLogging%3A1%0A%0Acall_me%20is%20not%20defined
 192.168.1.51 - "GET /~sven/core/pub/System/TwistyPlugin/twisty.css?version=1.6.0 HTTP/1.1" - [07/Apr/2012:16:18:32 +1000] 304 -
 192.168.1.51 - "GET /~sven/core/pub/System/JQueryPlugin/plugins/livequery/jquery.livequery.js?version=1.1.1 HTTP/1.1" - [07/Apr/2012:16:18:32 +1000] 304 -

This way we get super fast, no extra traffic client error tracking.

 

(If someone has the apache-foo to get the right SetEnvIF or RewriteCond to only log when an error is defined, please help – I tried, but failed.)

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Nov 16 2011

Foswiki Camp this weekend in CERN, Geneva

We’ll be meeting in CERN, for our long weekend foswiki code fest and association general assembly.

 

its not too late to sign up and help guide the future direction of foswiki

 

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Dec 15 2010

Google’s DataWiki experiment

Google Labs has just added a GoogleAppEngine based Java application called – DataWiki.

So far, project information is very minimal, but it looks like one of the features Foswiki (and its parent) have been doing for 10 years…

The timing is excellent, as I’ve been working with others in the Foswiki Community to improve Foswiki’s mashup-ability:

enable easy input/output from a variety of endpoints, e.g. via Twitter, ODK or SMS from a remote location

Right now we’re working on a proper REST API for foswiki data – enabling us to retrieve and save changes to datasets in formats that are convenient to the external endpoints – and to simplify the development to dynamic visualisation and editing tools for complex data.

Perhaps what we’re looking at is a combination of the acquired and shut down JotSpot, and a response to Yahoo Pipes :)

Foswiki is an extremely mature (10 years) DataWiki capable enterprise wiki, with significant traction in workplaces around the world, and a strong, motivated developer and user community.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Apr 17 2010

New Dynamic jquery mb.Menus for foswiki

I’ve just started work adding Matteo Bicocchi’s rather stunning mb.Components – starting with mb.Menu. Along the way, adding foswiki Macro’s to make it simpler for us to use, I’ve also made some changes to the code (which hopefully I can get integrated into an mb.Menu release) that I have attached to the live demo.

Here’s the all important Screenie:

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Oct 15 2009

I’ve been working on a Foswiki User administration user interface again

This iteration I’ve been working using the HTTPDUserAdminContrib – as having the users and groups in the database makes it hard to work on.

UserManagementUI

Hopefully there’ll be time to use and extend it for foswiki 1.1

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Aug 25 2008

firefox 3.x on debian amd64

Tag: debian,javascriptSven Dowideit @ 1:50 pm

I’ve been running a firefox 3.0 pre-release build for ages now, and finally thought I’d upgrade – (it turns out) mozilla do not provide 64 bit binaries. The i686 build that you can download from getfirefox.org does not work on my debian amd64 system – but not everything is lost.

As I’m a developer, I’m reasonably happy to play with nightly builds – and so – http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/ has what I need – today its firefox-3.1a2pre.en-US.linux-x86_64.tar.bz2.

Unziped into my non-debian firefox dir, and runs seemingly fine, except that the firefox addins won’t run, as they are scared of firefox versions that they have not been tested on :)

That too can be solved – edit the application.ini file, and replace the Version=3.1a2pre with Version=3.0.1 or whatever the release is that your addons are willing to work on.

so far, only VMWare’s addon won’t run – perhaps I need to set the Version lower, as it worked on Minefield 3.0pre.

http://packages.debian.org/search?keywords=iceweasel&searchon=names&suite=testing&section=all tells me that 3.0.1 is in amd64 debian testing since July 2008

VMWare’s addon to give console access won’t run in the 3.0.1 debian version either – talk about disappointing. The 3.1 nightly build seems to feel faster too, so I suspect I’ll be running that most of the time, and will look to migrate away from VMWare over time.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Next Page »


Positions by Seo-Watcher

Switch to our mobile site