Skip to content

Commit

Permalink
Merge pull request #803 from Shopify/configure-line-limit
Browse files Browse the repository at this point in the history
Configure default line limit for container logs
  • Loading branch information
dturn authored Feb 11, 2021
2 parents e610c64 + 83ed239 commit db459a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## next

*Enhancements*
- ENV["KRANE_LOG_LINE_LIMIT"] allows the number of container logs printed for failures to be configurable from the 25 line default [#803](https://github.com/Shopify/krane/pull/803).

## 2.1.6

*Enhancements*
- Remove the need for a hard coded GVK overide list via improvements to cluster discovery [#778](https://github.com/Shopify/krane/pull/778)

Expand Down
2 changes: 1 addition & 1 deletion lib/krane/container_logs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module Krane
class ContainerLogs
attr_reader :lines, :container_name

DEFAULT_LINE_LIMIT = 25
DEFAULT_LINE_LIMIT = Integer(ENV.fetch('KRANE_LOG_LINE_LIMIT', 25))

def initialize(parent_id:, container_name:, namespace:, context:, logger:)
@parent_id = parent_id
Expand Down

0 comments on commit db459a3

Please sign in to comment.