~arosales/charms/trusty/openstack-dashboard/add-default-key

« back to all changes in this revision

Viewing changes to templates/havana/local_settings.py

  • Committer: Edward Hope-Morley
  • Date: 2014-02-20 18:25:58 UTC
  • mfrom: (23.2.8 openstack-dashboard)
  • Revision ID: edward.hope-morley@canonical.com-20140220182558-v7pxp37bt3ofgklw
[yolanda] sync charmhelpers and add syslog support

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
import os
2
2
 
3
3
from django.utils.translation import ugettext_lazy as _
 
4
{% if use_syslog %}
 
5
from logging.handlers import SysLogHandler
 
6
{% endif %}
4
7
 
5
8
from openstack_dashboard import exceptions
6
9
 
248
251
            'level': 'INFO',
249
252
            'class': 'logging.StreamHandler',
250
253
        },
 
254
        {% if use_syslog %}
 
255
        'syslog': {
 
256
            'level': 'INFO',
 
257
            'class': 'logging.handlers.SysLogHandler',
 
258
        }
 
259
        {% endif %}
251
260
    },
252
261
    'loggers': {
253
262
        # Logging from django.db.backends is VERY verbose, send to null
261
270
            'propagate': False,
262
271
        },
263
272
        'horizon': {
 
273
            {% if use_syslog %}
 
274
            'handlers': ['syslog'],
 
275
            {% else %}
264
276
            'handlers': ['console'],
 
277
            {% endif %}
265
278
            'propagate': False,
266
279
        },
267
280
        'openstack_dashboard': {
268
 
            'handlers': ['console'],
 
281
            {% if use_syslog %}
 
282
            'handlers': ['syslog'],
 
283
            {% else %}
 
284
            'handlers': ['console'],
 
285
            {% endif %}
 
286
            'propagate': False,
 
287
        },
 
288
        'openstack_auth': {
 
289
            {% if use_syslog %}
 
290
            'handlers': ['syslog'],
 
291
            {% else %}
 
292
            'handlers': ['console'],
 
293
            {% endif %}
269
294
            'propagate': False,
270
295
        },
271
296
        'novaclient': {
 
297
            {% if use_syslog %}
 
298
            'handlers': ['syslog'],
 
299
            {% else %}
272
300
            'handlers': ['console'],
 
301
            {% endif %}
273
302
            'propagate': False,
274
303
        },
275
304
        'cinderclient': {
 
305
            {% if use_syslog %}
 
306
            'handlers': ['syslog'],
 
307
            {% else %}
276
308
            'handlers': ['console'],
 
309
            {% endif %}
277
310
            'propagate': False,
278
311
        },
279
312
        'keystoneclient': {
 
313
            {% if use_syslog %}
 
314
            'handlers': ['syslog'],
 
315
            {% else %}
280
316
            'handlers': ['console'],
 
317
            {% endif %}
281
318
            'propagate': False,
282
319
        },
283
320
        'glanceclient': {
 
321
            {% if use_syslog %}
 
322
            'handlers': ['syslog'],
 
323
            {% else %}
284
324
            'handlers': ['console'],
 
325
            {% endif %}
285
326
            'propagate': False,
286
327
        },
287
328
        'heatclient': {
 
329
            {% if use_syslog %}
 
330
            'handlers': ['syslog'],
 
331
            {% else %}
288
332
            'handlers': ['console'],
 
333
            {% endif %}
289
334
            'propagate': False,
290
335
        },
291
336
        'nose.plugins.manager': {
 
337
            {% if use_syslog %}
 
338
            'handlers': ['syslog'],
 
339
            {% else %}
292
340
            'handlers': ['console'],
 
341
            {% endif %}
293
342
            'propagate': False,
294
343
        }
295
344
    }