#
# {{project}} - Pylons development environment configuration
#
# The %(here)s variable will be replaced with the parent directory of this file
#
[DEFAULT]
debug = true
# Uncomment and replace with the address which should receive any error reports
#email_to = you@yourdomain.com
smtp_server = localhost
error_email_from = paste@localhost

[server:main]
use = egg:Paste#http
host = 127.0.0.1
port = 5000

[app:setup]
rdfalchemy.create = True
use = main

[app:main]
use = egg:{{project}}
full_stack = true
cache_dir = %(here)s/data
beaker.session.key = {{package}}
beaker.session.secret = somesecret

# If you'd like to fine-tune the individual locations of the cache data dirs
# for the Cache data, or the Session saves, un-comment the desired settings
# here:
#beaker.cache.data_dir = %(here)s/data/cache
#beaker.session.data_dir = %(here)s/data/sessions

# SQLAlchemy database URL
sqlalchemy.url = sqlite:///%(here)s/development.db

# RDFAlchemy database URL
# rdfalchemy.dburi = mysql://username@localhost/shabti_triplestore
# rdfalchemy.dburi = zodb:///%(here)s/data/graph/Data.fs
# rdfalchemy.dburi = sleepycat:///%(here)s/data/graph
# Uncomment this only for the paster setup-app step, then comment 
# it out again, otherwise the data will be wiped out when 
# the graph is opened.
# rdfalchemy.create = True
# rdfalchemy.identifier = shabti_triplestore

# WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT*
# Debug mode will enable the interactive debugging tool, allowing ANYONE to
# execute malicious code after an exception is raised.
#set debug = false


# Logging configuration
[loggers]
keys = root, routes, {{package_logger}}{{if sqlalchemy}}, sqlalchemy{{endif}}

[handlers]
keys = console

[formatters]
keys = generic

[logger_root]
level = INFO
handlers = console

[logger_routes]
level = INFO
handlers =
qualname = routes.middleware
# "level = DEBUG" logs the route matched and routing variables.

[logger_{{package_logger}}]
level = DEBUG
handlers =
qualname = {{package_logger}}

[logger_sqlalchemy]
level = INFO
handlers =
qualname = sqlalchemy.engine
# "level = INFO" logs SQL queries.
# "level = DEBUG" logs SQL queries and results.
# "level = WARN" logs neither.  (Recommended for production systems.)

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

[formatter_generic]
format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
datefmt = %H:%M:%S

# # Chainsaw Logging configuration
# [loggers]
# keys = root, {{package_logger}}{{if sqlalchemy}}, sqlalchemy{{endif}}
# 
# [handlers]
# keys = chainsaw
# 
# [formatters]
# keys = generic, xmllayout
# 
# [logger_root]
# level = NOTSET
# handlers = chainsaw
# 
# [logger_{{package_logger}}]
# level = DEBUG
# handlers =
# qualname = {{package_logger}}
# 
# [handler_console]
# class = StreamHandler
# args = (sys.stderr,)
# level = INFO
# formatter = generic
# 
# [logger_sqlalchemy]
# level = INFO
# handlers = chainsaw
# qualname = sqlalchemy.engine
# # "level = INFO" logs SQL queries.
# # "level = DEBUG" logs SQL queries and results.
# # "level = WARN" logs neither.  (Recommended for production systems.)
# 
# [handler_chainsaw]
# class = xmllayout.RawSocketHandler
# args = ('localhost', 4448)
# level = NOTSET
# formatter = xmllayout
# 
# [formatter_generic]
# format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
# datefmt = %H:%M:%S
# 
# [formatter_xmllayout]
# class = xmllayout.XMLLayout
