;       Licensed to the Apache Software Foundation (ASF) under one
;       or more contributor license agreements.  See the NOTICE file
;       distributed with this work for additional information
;       regarding copyright ownership.  The ASF licenses this file
;       to you under the Apache License, Version 2.0 (the
;       "License"); you may not use this file except in compliance
;       with the License.  You may obtain a copy of the License at
;
;         http://www.apache.org/licenses/LICENSE-2.0
;
;       Unless required by applicable law or agreed to in writing,
;       software distributed under the License is distributed on an
;       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
;       KIND, either express or implied.  See the License for the
;       specific language governing permissions and limitations
;       under the License.

# profile for profiling. use in conjunction with filter-with below.
;[filter:profile]
;use = egg:repoze.profile#profile
;log_filename = /allura/allura.profile
;cachegrind_filename = /allura-data/cachegrind.out.allura
;discard_first_request = true
;path = /__alluraprofile__
;flush_at_shutdown = true


[app:main]
use = config:development.ini#main
;filter-with = profile
activitystream.master = mongodb://mongo:27017

ming.main.uri = mongodb://mongo:27017/allura
ming.project.uri = mongodb://mongo:27017/project-data
ming.task.uri = mongodb://mongo:27017/task

scm.repos.refresh_base_url = http://web:8088

scm.repos.root = /allura-data/scm

scm.clonechoices.git = [{"name": "HTTP", "key": "http", "title": "HTTP"}, {"name": "File", "key": "file", "title": "Filesystem"}]
; may need to change "localhost" to your remote host name, or docker-machine IP address
scm.host.http.git = http://localhost:8080/git$path
scm.host.file.git = /allura-data/scm/git$path
scm.clonechoices.hg = [{"name": "File", "key": "file", "title": "Filesystem"}]
scm.host.file.hg = /allura-data/scm/hg$path
scm.clonechoices.svn = [{"name": "SSH", "key": "file", "title": "Filesystem"}]
scm.host.file.svn = file:///allura-data/scm/svn$path/

scm.repos.tarball.enable = true
scm.repos.tarball.root = /allura-data/scm/snapshots/
scm.repos.tarball.url_prefix = http://localhost:8080/

solr.server = http://solr:8983/solr/allura

smtp_server = outmail
smtp_port = 8826

forgemail.host = 0.0.0.0
forgemail.port = 8825

[app:task]
use = main
; TurboGears will use controllers/task.py as root controller
override_root = task

[loggers]
keys = root, allura, sqlalchemy, paste, ew, taskdstatus, timermiddleware, tmw_details

[handlers]
keys = console, taskdstatus, timermiddleware

[formatters]
keys = generic, timermiddleware

; If you create additional loggers, add them as a key to [loggers]
[logger_root]
level = INFO
handlers = console

[logger_allura]
level = INFO
handlers =
qualname = allura

[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.)

[logger_paste]
level = INFO
qualname = paste
handlers =

[logger_ew]
; easy widgets
level = WARN
qualname = ew
handlers =

[logger_tmw_details]
; DEBUG will include every instrumented call in our logging
level = INFO
qualname = timermiddleware
handlers =

[logger_taskdstatus]
level = INFO
qualname = taskdstatus
handlers = taskdstatus

[logger_timermiddleware]
level = INFO
handlers = timermiddleware
qualname = stats
propagate = 0

; If you create additional handlers, add them as a key to [handlers]
[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic

[handler_taskdstatus]
class = handlers.WatchedFileHandler
args = ('taskd_status.log', 'a')
level = NOTSET
formatter = generic

[handler_timermiddleware]
class = handlers.WatchedFileHandler
; if you run 'gunicorn' in allura/Allura/ then that's where this file will be
; you may want to hard-code a specific directory here.
args = ('stats.log', 'a')
level = NOTSET
formatter = timermiddleware

; If you create additional formatters, add them as a key to [formatters]
[formatter_generic]
format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
datefmt = %H:%M:%S

[formatter_timermiddleware]
format = {"time": "%(asctime)s,%(msecs)03d", "level": "%(levelname)-5.5s", "name": "%(name)s", "message": %(message)s}
datefmt = %Y-%m-%d %H:%M:%S
