Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
StylePage tools: Python logging
Python
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples
src
.gitignore
README.md
setup.py

README.md

StylePage tools: Python logging

Dependencies

This tool has no dependencies outside of standard Python libraries.

Installation

For a simple system-wide read-only installation:

sudo pip install -e "git+http://github.com/stylepage/splog.git#egg=splog"

or, for a system-wide developer installation:

git clone git@github.com:stylepage/splog.git splog
sudo pip install -e splog

or, for a read-only installation inside a virtualenv:

virtualenv env
source env/bin/activate
pip install -e "git+http://github.com/stylepage/splog.git#egg=splog"

Examples

import splog
splog.info('Foo Bar')
        2011-07-25 13:59:41,476 root INFO Foo Bar
import splog
splog.configure(filename='/tmp/foo.log')
splog.info('Foo Bar')
with open('/tmp/foo.log', 'r') as logfile:
    print logfile.read()
        2011-07-25 14:02:03,134 root INFO Foo Bar
Something went wrong with that request. Please try again.