You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by du...@apache.org on 2021/08/27 11:10:28 UTC
[brooklyn-docs] branch master updated: Added filter applied to debug
This is an automated email from the ASF dual-hosted git repository.
duncangrant pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-docs.git
The following commit(s) were added to refs/heads/master by this push:
new d5831ec Added filter applied to debug
new ceb9e97 Merge pull request #328 from jcabrerizo/feature/tdagent-filter
d5831ec is described below
commit d5831ecc2b012fa735d3c905d460e3e62ad7a370
Author: Juan Cabrerizo <ju...@cloudsoft.io>
AuthorDate: Fri Aug 27 10:55:21 2021 +0100
Added filter applied to debug
---
guide/ops/logging.md | 56 ++++++++++++++++++++++++++++++----------------------
1 file changed, 32 insertions(+), 24 deletions(-)
diff --git a/guide/ops/logging.md b/guide/ops/logging.md
index a39975e..a25353b 100644
--- a/guide/ops/logging.md
+++ b/guide/ops/logging.md
@@ -137,35 +137,40 @@ is a good simple way to forward content added to the info and debug log files:
```
<source>
- @type tail
- @id input_tail_brooklyn_info
- @log_level info
- <parse>
- @type multiline
- format_firstline /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/
- format1 /^(?<timestamp>\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z) (?<taskId>\S+)?-(?<entityIds>\S+)? (?<level>\w{4} |\w{5})\W{1,4}(?<bundleId>\d{1,3}) (?<class>(?:\S\.)*\S*) \[(?<threadName>\S+)\] (?<message>.*)/
- time_format %Y-%m-%dT%H:%M:%S,%L
- </parse>
- path /var/logs/brooklyn/brooklyn.info.log
- pos_file /var/log/td-agent/brooklyn.info.log.pos
- tag brooklyn.info
+ @type tail
+ @id input_tail_brooklyn_info
+ @log_level info
+ <parse>
+ @type multiline
+ format_firstline /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/
+ format1 /^(?<timestamp>\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z) (?<taskId>\S+)?-(?<entityIds>\S+)? (?<level>\w{4} |\w{5})\W{1,4}(?<bundleId>\d{1,3}) (?<class>(?:\S\.)*\S*) \[(?<threadName>\S+)\] (?<message>.*)/
+ time_format %Y-%m-%dT%H:%M:%S,%L
+ </parse>
+ path /var/logs/brooklyn/brooklyn.info.log
+ pos_file /var/log/td-agent/brooklyn.info.log.pos
+ tag brooklyn.info
</source>
<source>
- @type tail
- @id input_tail_brooklyn_debug
- @log_level debug
- <parse>
- @type multiline
- format_firstline /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/
- format1 /^(?<timestamp>\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z) (?<taskId>\S+)?-(?<entityIds>\S+)? (?<level>\w{4} |\w{5})\W{1,4}(?<bundleId>\d{1,3}) (?<class>(?:\S\.)*\S*) \[(?<threadName>\S+)\] (?<message>.*)/
- time_format %Y-%m-%dT%H:%M:%S,%L
- </parse>
- path /var/logs/brooklyn/brooklyn.debug.log
- pos_file /var/log/td-agent/brooklyn.debug.log.pos
- tag brooklyn.debug
+ @type tail
+ @id input_tail_brooklyn_debug
+ @log_level debug
+ <parse>
+ @type multiline
+ format_firstline /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/
+ format1 /^(?<timestamp>\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z) (?<taskId>\S+)?-(?<entityIds>\S+)? (?<level>\w{4} |\w{5})\W{1,4}(?<bundleId>\d{1,3}) (?<class>(?:\S\.)*\S*) \[(?<threadName>\S+)\] (?<message>.*)/
+ time_format %Y-%m-%dT%H:%M:%S,%L
+ </parse>
+ path /var/logs/brooklyn/brooklyn.debug.log
+ pos_file /var/log/td-agent/brooklyn.debug.log.pos
+ tag brooklyn.debug
</source>
+<filter brooklyn.debug>
+ @type grep
+ regexp1 level DEBUG
+</filter>
+
<match brooklyn.*>
@type elasticsearch
hosts https://localhost:9200
@@ -177,6 +182,9 @@ is a good simple way to forward content added to the info and debug log files:
</match>
```
+The filter block is needed for only picking up the `debug` log level from the debug source, as the `info` and upper
+levels are already present in the info file.
+
#### Sizing and Rotating Logs
Keeping log data obviously consumes disk storage, and serving the data requires memory.