Update awslogs.md#3319
Conversation
nrdlngr
left a comment
There was a problem hiding this comment.
Hi, and thanks for your contribution. Would you mind making the following suggested changes to your documentation?
|
|
||
| ### awslogs-multiline-pattern | ||
|
|
||
| The `awslogs-multiline-pattern` specifies a regular expression pattern for identifying the start of a log message. A log message is made of a line that matches the pattern and any following lines that don't match the pattern. |
There was a problem hiding this comment.
The awslogs-multiline-pattern specifies a regular expression pattern for identifying the beginning of a container log entry. Any following lines that do not match the pattern are considered to be part of the current log entry. The next line that matches the pattern begins a new log entry.
| > **Note**: | ||
| > Multiline logging performs regular expression parsing and matching of all log messages, which may have a negative impact on logging performance. | ||
|
|
||
| For example, to process the following log stream where new log messages start with the pattern `INFO`: |
There was a problem hiding this comment.
For example, to process the following log stream where new log entries begin with the pattern INFO:
| ... | ||
| ``` | ||
|
|
||
| Which will generate the following CloudWatch log events: |
There was a problem hiding this comment.
This configuration would generate the following CloudWatch log entries:
| Which will generate the following CloudWatch log events: | ||
|
|
||
| ``` | ||
| # First event |
There was a problem hiding this comment.
Can you change "First event", "Second event", and "Third event" to use "entry" instead of event?
|
|
||
| ### awslogs-datetime-format | ||
|
|
||
| The `awslogs-datetime-format` specifies an [strftime expression pattern](http://strftime.org) for identifying the start of a log message. A log message is made of a line that matches the pattern and any following lines that don't match the pattern. |
There was a problem hiding this comment.
The awslogs-datetime-format specifies a strftime expression pattern for for identifying the beginning of a container log entry. Any following lines that do not match the pattern are considered to be part of the current log entry. The next line that matches the pattern begins a new log entry.
| > **Note**: | ||
| > Multiline logging performs regular expression parsing and matching of all log messages, which may have a negative impact on logging performance. | ||
|
|
||
| For example, to process the following log stream where new log messages start with the following timestamps: |
There was a problem hiding this comment.
For example, to process the following log stream where new log entries begin with the following timestamps:
| [May 01, 2017 19:01:32] Another message was logged | ||
| ``` | ||
|
|
||
| An strftime expression of `[%b %d, %Y %H:%M:%S]` can be used: |
There was a problem hiding this comment.
You can use the strftime expression, [%b %d, %Y %H:%M:%S]:
| ... | ||
| ``` | ||
|
|
||
| Which will generate the following CloudWatch log events: |
There was a problem hiding this comment.
This configuration would generate the following CloudWatch log entries:
| Which will generate the following CloudWatch log events: | ||
|
|
||
| ``` | ||
| # First event |
There was a problem hiding this comment.
Can you change "First event", "Second event", and "Third event" to use "entry" instead of event?
| [May 01, 2017 19:01:32] Another message was logged | ||
| ``` | ||
|
|
||
| The following strftime codes are supported: |
There was a problem hiding this comment.
The following strftime codes are supported:
2f96537 to
ff98880
Compare
|
@nrdlngr - changes submitted as requested |
|
@FrenchBen PTAL or nominate. |
|
I think this is more of a review by @samuelkarp - if he's happy with it, I don't see any blockers |
| Mac; for example: `sudo ifconfig lo0 alias 10.200.10.1/24`, and make sure that | ||
| your service is listening on this address or `0.0.0.0` (ie not `127.0.0.1`). | ||
| Then containers can connect to this address. | ||
| The Mac has a changing IP address (or none if you have no network access). From |
There was a problem hiding this comment.
This looks like an unrelated change.
| > Your AWS IAM policy must include the `logs:CreateLogGroup` permission before you attempt to use `awslogs-create-group`. | ||
|
|
||
| ### awslogs-multiline-pattern | ||
|
|
There was a problem hiding this comment.
Does this need {% include edge_only.md section="option" %} or did the feature make it into the 17.06.0 RC?
There was a problem hiding this comment.
It still needs it even if so, because 17.06 is not released yet. The code is:
{% include edge_only.md section="option" %}
Or maybe "feature" instead of "option" if that fits better. The text is not arbitrary, but there are a few choices, see _inclues/edge_only.md for more info on how it works.
0ca55e2 to
09abadd
Compare
|
I interactive rebased and removed the unrelated commit. |
|
This was already addressed in #3615 |
|
@mstanleyjones It looks like #3615 lost a lot of the content from this one. Is that intentional? |
|
Not necessarily, no. I'll review it and see what we need to keep from here. I wasn't focused on this PR when I did the work on that other one. |
Signed-off-by: Justin Menga <justin.menga@gmail.com>
Signed-off-by: Justin Menga <justin.menga@gmail.com>
09abadd to
637cb38
Compare
|
I'm taking this over to get the important info in here ported over. |
| INFO Another message was logged | ||
| ``` | ||
|
|
||
| You can use the strftime expression of `[%b %d, %Y %H:%M:%S]`: |
There was a problem hiding this comment.
Looks like this line is misplaced. Did you mean to have it say "You can use the regular expression of ^INFO:"?
| For example, to process the following log stream where new log messages start with the pattern `INFO`: | ||
|
|
||
| Consider the following log stream, where each log message should start with the | ||
| patther `INFO`: |
Signed-off-by: Justin Menga justin.menga@gmail.com
Proposed changes
Add documentation for new AWS CloudWatch logs multiline pattern options
Unreleased project version
Docker Engine 17.06
Related issues
moby/moby#30891