Skip to content

Commit 7baa61f

Browse files
Scott BarnhartScott Barnhart
Scott Barnhart
and
Scott Barnhart
authored
Added support for enabling invocation logs separately from other log4j loggers. (#108)
* Added support for enabling invocation logs separately from other `log4j` loggers. * PR comments Co-authored-by: Scott Barnhart <sbarnhart@expedia.com>
1 parent 47970a9 commit 7baa61f

File tree

6 files changed

+66
-47
lines changed

6 files changed

+66
-47
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ All notable changes to this project will be documented in this file.
33

44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
55

6+
## [3.6.1] - 2022-04-06
7+
- Added support for enabling invocation logs separately from other `log4j` loggers.
8+
69
## [3.6.0] - 2022-03-22
710
- Added support for AWS Glue metastore federation.
811

README.md

Lines changed: 48 additions & 47 deletions
Large diffs are not rendered by default.

k8s.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ resource "kubernetes_deployment" "waggle_dance" {
7272
name = "LOGLEVEL"
7373
value = var.wd_log_level
7474
}
75+
env {
76+
name = "INVOCATIONLOGLEVEL"
77+
value = var.enable_invocation_logs ? "debug" : "info"
78+
}
7579
env {
7680
name = "SERVER_YAML"
7781
value = base64encode(data.template_file.server_yaml.rendered)

templates.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ data "template_file" "waggledance" {
175175
region = var.aws_region
176176
loggroup = var.wd_instance_type == "ecs" ? join("", aws_cloudwatch_log_group.waggledance_ecs.*.name) : ""
177177
loglevel = var.wd_log_level
178+
invocationloglevel = var.enable_invocation_logs ? "debug" : "info"
178179
server_yaml = base64encode(data.template_file.server_yaml.rendered)
179180
federation_yaml = base64encode(data.template_file.federation_yaml.rendered)
180181
hive_site_xml = var.alluxio_endpoints == [] ? "" : base64encode(data.template_file.hive_site_xml.rendered)

templates/waggledance.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
"name": "LOGLEVEL",
2828
"value": "${loglevel}"
2929
},
30+
{
31+
"name": "INVOCATIONLOGLEVEL",
32+
"value": "${invocationloglevel}"
33+
},
3034
{
3135
"name": "SERVER_YAML",
3236
"value": "${server_yaml}"

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ variable "wd_log_level" {
2828
default = "info"
2929
}
3030

31+
variable "enable_invocation_logs" {
32+
description = "Turns on Waggledance invocation logs in log4j, by default only slow (1 minute+) invocations are logged."
33+
type = bool
34+
default = false
35+
}
36+
3137
variable "enable_autoscaling" {
3238
description = "Enable k8s horizontal pod autoscaling"
3339
type = bool

0 commit comments

Comments
 (0)