log2jsconsole
It 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)
Or you can add this as a filter of Python Paste:
[filter:log]
use = egg:log2jsconsole
auto_install = True
Changelog
Version 0.4
Released on June 7, 2013.
Support for Python Paste filter entry point. [#1 by Roberto De Almeida]
Fixed incompatibile signature (according to PEP 333) of start_response. [#1 by Roberto De Almeida]
Version 0.3
Released on November 28, 2011.
Fixed a bug of Content-Type detection.
Version 0.2
Released on November 28, 2011.
Fixed a bug of Content-Type detection.
Version 0.1
Initially released on November 26, 2011.
Metadata
Release files for log2jsconsole 0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| log2jsconsole-0.4.tar.gz | 3.0 kB | Without provenance | Details |
Release files / log2jsconsole-0.4.tar.gz
| Download URL | log2jsconsole-0.4.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7d5fd0114cf87bf06ecae97aebadecc98ec14f1e87165bf27ea3ae23e4904c9a
|
|
BLAKE2b-256 checksum How to use checksums |
7d840412c8ec0693ac7056c9370834820327441aa77cb42091782491ea8a8bee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for log2jsconsole 0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.