This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
README
======

This package is meant to be used to setup logging to the database from a pyramid application.
To include in a pyramid application you need to alter the development.ini/production.ini files.

EXAMPLE INI FILE
================

[loggers]
keys = root, myapp

[handlers]
keys = console, sqlalchemy

[formatters]
keys = generic

[logger_root]
level = INFO
handlers = console

[logger_myapp]
level = DEBUG
handlers = sqlalchemy
qualname = myapp

[handler_sqlalchemy]
class = logservice.handlers.sqlalchemy_handler.SQLAlchemyHandler
args = ()
level = NOTSET
formatter = generic

[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic

[formatter_generic]
format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s


You will also want to create an initialize_log_db.py file in your scripts folder

EXAMPLE initialize_log_db.py
============================

import os
import sys
from logservice.scripts import initializedb

from pyramid.paster import (
get_appsettings,
setup_logging,
)

from pyramid.scripts.common import parse_vars


def usage(argv):
cmd = os.path.basename(argv[0])
print('usage: %s <config_uri> [var=value]\n'
'(example: "%s development.ini")' % (cmd, cmd))
sys.exit(1)


def main(argv=sys.argv):
if len(argv) < 2:
usage(argv)
config_uri = argv[1]
options = parse_vars(argv[2:])
setup_logging(config_uri)
settings = get_appsettings(config_uri, options=options)
log = initializedb.InitializeDb(settings['sqlalchemy.url'])
log.initialize_db()


EXAMPLE setup.py change
=======================

entry_points = """\
[paste.app_factory]
main=myapp:main
[console_scripts]
initialize_log_db = myapp.scripts.initialize_log_db:main
""",
Release History

Release History

0.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
PyramidLogService-0.1-py3.5.egg (12.9 kB) Copy SHA256 Checksum SHA256 3.5 Egg Oct 8, 2016
PyramidLogService-0.1.tar.gz (3.8 kB) Copy SHA256 Checksum SHA256 Source Oct 8, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting