question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support logging configuration in `kubectl cloudflow deploy` and `kubectl cloudflow configure`

See original GitHub issue

Currently it is hard to configure logging for cloudflow streamlets.

You have to specify a logback.xml per sub-project in src/main/resources to get the file on the classpath, which works for akka streamlets.

For Flink streamlets, overriding the default logging does not work at the moment. Log4j and logback is set in task and job managers through:

Dlog4j.configuration=file:/opt/flink/conf/log4j-console.properties
Dlogback.configurationFile=file:/opt/flink/conf/logback-console.xml

And these files are packaged by default in Flink. For Spark, which uses log4j, defaults from a jar file bundled with Spark are used, if log4j.properties are not found on the classpath. So for Spark you need to add a log4j.properties file in the sub-project src/main/resources.

All of this is very cumbersome to configure correctly.

It would be better if logging configuration could be provided through kubectl cloudflow deploy and kubectl cloudflow configure, allowing users to provide log4j and logback files. See https://github.com/GoogleCloudPlatform/spark-on-k8s-operator/issues/753 for an idea on how to get this to work in Spark. The approach will probably work in general:

  • put log config files in config maps
  • mount the config maps on the pods under well-known names.
  • Add java options to pass through log config as system properties.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
andreaTPcommented, Jan 27, 2021

Thanks for the feedback @vkorenev ! The problem has been fixed here: https://github.com/lightbend/cloudflow/commit/42a96fb39d5dbc374ade14693db5ca900ae94063 but is not yet available in the current documentation.

1reaction
RayRoestenburgcommented, Oct 9, 2020

@franciscolopezsancho yes you can first tackle being able to change logging through the kubectl cloudflow, with deploy and configure command, even if it only supports a subset of streaming engines. It’s ok to do that iteratively.

point 2 might not work with Spark’s dependency on log4j

Read more comments on GitHub >

github_iconTop Results From Across the Web

kubectl-cloudflow
Synopsis · --help detailed configure command help · <cloudflowApp> the cloudflow application · --conf <value> the configuration file/s in HOCON format · config-key ......
Read more >
The Cloudflow Configuration Model
Using this model, you can configure the following settings: Runtime settings (for Akka, Spark, Flink, or any user-provided one). Kubernetes pod and container ......
Read more >
lightbend/cloudflow - Gitter
Extracting these common settings into a dedicated conf file and deploying that via kubectl cloudflow would not really help here, because blueprint.conf ...
Read more >
Logging Architecture | Kubernetes
The sidecar container streams application logs to its own stdout . · The sidecar container runs a logging agent, which is configured to...
Read more >
Kentik for IBM Cloud
Includes About IBM Cloud Flow Logs, IBM Logging Setup Overview, Flow Log Setup in IBM Cloud, etc. ... a Kubernetes deployment in an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found