Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • BackTrack 5 R2
  • Wine 1.4 / 1.5.5
  • Mozilla Firefox 12...
  • Ubuntu 11.04
  • Angry Birds 1.1.2.1
  • Ubuntu 10.04.4 LTS
  • Linux Kernel 3.4
  • Ubuntu Manual 10.10
  • Adobe Flash Player...
  • Pidgin 2.10.4
  • Home > Linux > System > Logging

    log2jsconsole 0.3

    Download button

    Downloads: 64  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Hong MinHee | More programs
    MIT/X Consortium Lic... / FREE
    November 30th, 2011, 18:11 GMT
    ROOT / System / Logging

     Read user reviews (0)  Refer to a friend  Subscribe

    log2jsconsole description

    Simple WSGI middleware that helps to log messages into JavaScript console object

    log2jsconsole provides a simple WSGI middleware that helps to log messages into JavaScript console object. For example, if you log messages like:

    logger = logging.getLogger('my.logger')
    logger.warning('warning message')
    logger.debug('debug message')


    The middleware automatically appends codes like following JavaScript:

    < script >
    // < ![CDATA[
    if (console) {
     console.warn('my.logger: warning message');
     console.debug('my.logger: debug message');
    }
    // ]] >
    < /script >


    Installation

    You can install it by downloading from PyPI through pip or easy_install:

    pip install log2jsconsole

    How to use

    Assume that your WSGI application name is app:

    from yourapp import app
    from log2jsconsole import LoggingMiddleware


    app = LoggingMiddleware(app)


    Product's homepage

    Requirements:

    · Python

      


    TAGS:

    WSGI middleware | log messages | JavaScript console | WSGI | middleware | message



    HTML code for linking to this page:


    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM