Scott Baker | 80a36b7 | 2018-03-12 18:55:53 -0700 | [diff] [blame] | 1 | |
| 2 | # |
| 3 | # Copyright 2017 the original author or authors. |
| 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | # |
| 17 | |
Zsolt Haraszti | d7ae9d5 | 2016-09-27 09:56:49 -0700 | [diff] [blame] | 18 | logging: |
| 19 | version: 1 |
| 20 | |
| 21 | formatters: |
| 22 | brief: |
| 23 | format: '%(message)s' |
| 24 | default: |
| 25 | format: '%(asctime)s.%(msecs)03d %(levelname)-8s %(module)s.%(funcName)s %(message)s' |
| 26 | datefmt: '%Y%m%dT%H%M%S' |
| 27 | fluent_fmt: |
| 28 | '()': fluent.handler.FluentRecordFormatter |
| 29 | format: |
| 30 | level: '%(levelname)s' |
| 31 | hostname: '%(hostname)s' |
| 32 | where: '%(module)s.%(funcName)s' |
khenaidoo | 55c6b0c | 2017-08-28 12:27:54 -0400 | [diff] [blame] | 33 | fluent_default: |
| 34 | format: '%(asctime)s.%(msecs)03d %(levelname)-8s %(threadName)s %(module)s.%(funcName)s %(message)s' |
| 35 | datefmt: '%Y%m%dT%H%M%S' |
Zsolt Haraszti | d7ae9d5 | 2016-09-27 09:56:49 -0700 | [diff] [blame] | 36 | |
| 37 | handlers: |
| 38 | console: |
| 39 | class : logging.StreamHandler |
| 40 | level: DEBUG |
| 41 | formatter: default |
| 42 | stream: ext://sys.stdout |
| 43 | fluent: |
| 44 | class: fluent.handler.FluentHandler |
| 45 | host: localhost |
| 46 | port: 24224 |
khenaidoo | 77c0d0c | 2017-08-24 13:45:14 -0400 | [diff] [blame] | 47 | tag: chameleon.logging |
khenaidoo | 55c6b0c | 2017-08-28 12:27:54 -0400 | [diff] [blame] | 48 | # Since fluent formatter output an exception with grpc data, use |
| 49 | # a basic formatter for now. |
| 50 | # formatter: fluent_fmt |
| 51 | formatter: fluent_default |
Zsolt Haraszti | d7ae9d5 | 2016-09-27 09:56:49 -0700 | [diff] [blame] | 52 | level: DEBUG |
khenaidoo | 56f4592 | 2017-04-05 14:23:31 -0500 | [diff] [blame] | 53 | localRotatingFile: |
| 54 | class: logging.handlers.RotatingFileHandler |
| 55 | filename: chameleon.log |
| 56 | formatter: default |
| 57 | maxBytes: 2097152 |
| 58 | backupCount: 10 |
| 59 | level: DEBUG |
Zsolt Haraszti | d7ae9d5 | 2016-09-27 09:56:49 -0700 | [diff] [blame] | 60 | null: |
| 61 | class: logging.NullHandler |
| 62 | |
| 63 | loggers: |
| 64 | amqp: |
| 65 | handlers: [null] |
| 66 | propagate: False |
| 67 | conf: |
| 68 | handlers: [null] |
| 69 | propagate: False |
| 70 | '': # root logger |
khenaidoo | 56f4592 | 2017-04-05 14:23:31 -0500 | [diff] [blame] | 71 | handlers: [console, fluent, localRotatingFile] |
Zsolt Haraszti | d7ae9d5 | 2016-09-27 09:56:49 -0700 | [diff] [blame] | 72 | level: INFO # this can be bumped up/down by -q and -v command line |
| 73 | # options |
| 74 | propagate: False |