<?xml version="1.0" encoding="UTF-8" ?>
<rdf:RDF xmlns="http://usefulinc.com/ns/doap#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><Project><name>stxnext.log</name>
<shortdesc>This logger offers some conveniences that make easier of logging from python code and from ZPT templates.</shortdesc>
<description>===========
stxnext.log
===========

Overview
========

This is logger written from scratch. It offers few conveniences that
helps in logging (e.g.: logging exceptions). It can also log some
messages from ZPT (Zope Page Templates). 
  
Using
=====

stxnext.log can be opened by used in python code::

    &gt;&gt;&gt; from stxnext.log import log
    &gt;&gt;&gt; log('log &lt;this&gt; text')
    &gt;&gt;&gt; log('log another text', printit=True) #doctest:+ELLIPSIS
    [...] log another text
    &gt;&gt;&gt; try:
    ...     1/0
    ... except ZeroDivisionError, e:
    ...     log.log_exc(e)
    ...
    &gt;&gt;&gt; log.getLoggedTextAsHtml() #doctest:+ELLIPSIS, +NORMALIZE_WHITESPACE
    &lt;pre&gt;[...] log &amp;lt;this&amp;gt; text...&lt;/pre&gt;
  
stxnext.log can be also used in ZPT templates::

    &lt;tal:block tal:define="log context/@@STXNextLogger;
                           result python: log.setFilename('logger_filename.log');
                           result python: log.setName('logger name');"&gt;
        &lt;tal:block tal:define="result python: log('log this text')" /&gt;
        &lt;tal:block tal:define="result python: log('log another text', printit=True)" /&gt;  
        &lt;pre tal:replace="structure log/getLoggedTextAsHtml" /&gt;
    &lt;/tal:block&gt;


Installation
============

Alternatively, if you are using zc.buildout to manage your project, 
you can do this:

* Add ``stxnext.log`` to the list of eggs to install, e.g.::

    [buildout]
    ...
    eggs =
        ...
        stxnext.log
        
* If you're using plone.recipe.zope2instance recipe to manage your 
  instance add this lines to install a ZCML slug::

    [instance]
    recipe = plone.recipe.zope2instance
    ...
    zcml =
        ...
        stxnext.log
      
* If you're using zc.zope3recipes:application recipe to manage your 
  instance add this lines to install a ZCML slug::

    [instance]
    recipe = zc.zope3recipes:application
    ...
    site.zcml =
        ...
        &lt;include package="stxnext.log" /&gt;       
      
* Re-run buildout, e.g. with::

    $ ./bin/buildout
        
You can skip the ZCML slug if you are going to explicitly include the package
from another package's configure.zcml file.


References
==========

* `stxnext.log home page`_
* `stxnext.log at pypi`_

.. _stxnext.log home page: http://stxnext.pl/open-source/stxnext.log
.. _stxnext.log at pypi: http://pypi.python.org/pypi/stxnext.log/


Author &amp; Contact
================

:Author: Wojciech Lichota &lt;``wojciech.lichota[at]stxnext.pl``&gt;

.. image:: http://stxnext.pl/open-source/files/stx-next-logo

**STX Next** Sp. z o.o.

http://stxnext.pl

info@stxnext.pl</description>
<homepage rdf:resource="http://stxnext.pl/open-source/stxnext.log" />
<maintainer><foaf:Person><foaf:name>STX Next Sp. z o.o, Wojciech Lichota</foaf:name>
<foaf:mbox_sha1sum>4e8695e6d031b97536590b33c5dcd6014cf8b00e</foaf:mbox_sha1sum></foaf:Person></maintainer>
<release><Version><revision>0.2.0</revision></Version></release>
</Project></rdf:RDF>