Skip to content

Commit be4790a

Browse files
committed
Add note about strftime format string being required
1 parent e99fc83 commit be4790a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

watchtower/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,10 @@ class CloudWatchLogHandler(logging.Handler):
149149
Name of the CloudWatch log stream to write logs to. By default, a string containing the machine name, the
150150
program name, and the name of the logger that processed the message is used. Accepts the following format string
151151
parameters: {machine_name}, {program_name}, {logger_name}, {process_id}, {thread_name}, and {strftime:%m-%d-%y},
152-
where any strftime string can be used to include the current UTC datetime in the stream name. The strftime
153-
format string option can be used to sort logs into streams on an hourly, daily, or monthly basis.
152+
where a strftime string can be used to include the current UTC datetime in the stream name. The strftime
153+
format string option can be used to sort logs into streams on an hourly, daily, or monthly basis. Note
154+
CloudWatch does not allow colons in the log stream name, so for the strftime placeholder to work, a format
155+
string without colons must be specified.
154156
:param use_queues:
155157
If **True** (the default), logs will be queued on a per-stream basis and sent in batches. To manage the queues,
156158
a queue handler thread will be spawned. You can set this to False to make it easier to debug threading issues in

0 commit comments

Comments
 (0)