-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update awslogs.md #3319
Update awslogs.md #3319
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, and thanks for your contribution. Would you mind making the following suggested changes to your documentation?
engine/admin/logging/awslogs.md
Outdated
@@ -77,6 +77,115 @@ $ docker run --log-driver=awslogs \ | |||
> **Note**: | |||
> Your AWS IAM policy must include the `logs:CreateLogGroup` permission before you attempt to use `awslogs-create-group`. | |||
|
|||
### 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
engine/admin/logging/awslogs.md
Outdated
> **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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example, to process the following log stream where new log entries begin with the pattern INFO
:
engine/admin/logging/awslogs.md
Outdated
... | ||
``` | ||
|
||
Which will generate the following CloudWatch log events: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This configuration would generate the following CloudWatch log entries:
engine/admin/logging/awslogs.md
Outdated
Which will generate the following CloudWatch log events: | ||
|
||
``` | ||
# First event |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you change "First event", "Second event", and "Third event" to use "entry" instead of event?
engine/admin/logging/awslogs.md
Outdated
|
||
### 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
engine/admin/logging/awslogs.md
Outdated
> **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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example, to process the following log stream where new log entries begin with the following timestamps:
engine/admin/logging/awslogs.md
Outdated
[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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use the strftime
expression, [%b %d, %Y %H:%M:%S]
:
engine/admin/logging/awslogs.md
Outdated
... | ||
``` | ||
|
||
Which will generate the following CloudWatch log events: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This configuration would generate the following CloudWatch log entries:
engine/admin/logging/awslogs.md
Outdated
Which will generate the following CloudWatch log events: | ||
|
||
``` | ||
# First event |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you change "First event", "Second event", and "Third event" to use "entry" instead of event?
engine/admin/logging/awslogs.md
Outdated
[May 01, 2017 19:01:32] Another message was logged | ||
``` | ||
|
||
The following strftime codes are supported: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
docker-for-mac/networking.md
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like an unrelated change.
engine/admin/logging/awslogs.md
Outdated
@@ -77,6 +77,115 @@ $ docker run --log-driver=awslogs \ | |||
> **Note**: | |||
> 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/patther/pattern/
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