Menu

AJAX and RECEIVE log from server

Help
2006-10-12
2013-04-29
  • Angelo Zerr

    Angelo Zerr - 2006-10-12

    Hi,
    I use JAVA log4j in my WEB Application and I would like display log on client side at runtime.
    I read documentation and I found AJAXAppender, but according to the documentation, AJAXAppender SENDS log messages to a server.

    Is it possible to RECEIVE message from server with log4jjavscript? I have a java struts action (server side) which log message with java log4j, and I would like have an AJAX component which is able to plug with JAVA log4j logs, in order to display logs into an HTML console.

    Thank you for your response.

    Regards Angelo

     
    • Tim Down

      Tim Down - 2006-10-20

      Hi Angelo.

      Apologies for the delay in replying - I've only just noticed your message.

      It's not currently possible in log4javascript to receive messages from the server. To be honest it's not something I'd even thought of. It would certainly be possible to write a custom Ajax script that polls the server and uses log4javascript's PopUpAppender or InPageAppender as its console, but there's nothing built in.

      Tim

       
    • Angelo Zerr

      Angelo Zerr - 2006-10-20

      Hi Tim,
      no problem for your delay. Thank you for your response. I'm developping an JAVA AjaxApender which is able to store event of log4J (JAVA) into JAVA queue. So after with Ajax.PeriodicalUpdater of prototype.js I get logs of server. It's starting to works (I can display logs of server into HTML page). Now I'm studying your log4javascript to display logs received into Browser console.

      Once I have ended, I would like integrate my component into my open source projetct http://jscontrolstags.sourceforge.net/ in order to include taglib which generate log4j received.

      Have you agree that I integrate your log4javascript into my project (in order to customize log recived with your log4javascript?)

      - I'm not able to display log into my FireFox Console by usin your demo http://www.timdown.co.uk/log4javascript/log4javascript-current/demos/full.html
      Is it possible to display logs into Javascript Console of firefox.

      Angelo

       
    • Tim Down

      Tim Down - 2006-10-23

      Angelo,

      You're very welcome to include log4javascript in your project. The terms of the license (Apache License version 2.0) are basically that you can do what you like so long as you leave the credits in and include a copy of the licence in your distribution - see http://www.apache.org/foundation/licence-FAQ.html#WhatDoesItMEAN.

      About the Firefox console, it is possible to display messages in the JavaScript console but not without changing some user preferences (sorry, I don't have the links to hand), so I decided not to include it in log4javascript. It would, however, be simple to write an appender that does that.

      Tim

       
    • Angelo Zerr

      Angelo Zerr - 2006-10-23

      Ok thank you for your answer. Perhaps with Firebug plugin (Firebug logging support), I could log my messages.

      Angelo

       
      • Tim Down

        Tim Down - 2006-10-23

        Certainly - the latest version (1.3) has explicit support for logging to FireBug.

        Tim

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.