Felix Hildén
06/09/2023, 12:01 PMexecute
, but for debugging I’d like to change logging levels. Currently I only see warning and up, and I haven’t found a way to show more. In a proper deployment on K8s all logs are visible thanks to configuring logConfiguration:log4j-console.properties
. Is there a way to change the level with some configuration either in code or in a config file? The flink deployment is pointing to the same exact entry point in Python, so surely there must be, but merely having a log4j-console.properties
file didn’t do the job. Where am I going wrong?Carlos Santos
06/09/2023, 1:08 PMFelix Hildén
06/09/2023, 1:17 PMCarlos Santos
06/09/2023, 1:18 PMFelix Hildén
06/09/2023, 1:18 PMCarlos Santos
06/09/2023, 1:28 PMFelix Hildén
06/09/2023, 1:28 PMFelix Hildén
06/09/2023, 2:19 PMconf
under the Flink install directory (not a huge surprise), but all of the logging template files were already set to level INFO.
While debugging, I noticed that all logging coming from child processes - flink operators - was suppressed, warnings included. Here’s a minimal example:
from logging import DEBUG, getLogger
from pyflink.common import Types
from pyflink.datastream import StreamExecutionEnvironment
logger = getLogger(__name__)
logger.setLevel(DEBUG)
print("PRINT is visible")
<http://logger.info|logger.info>("INFO should be visible but is not")
logger.warning("WARNING is visible")
def test_operator(n: int) -> int:
print("PRINT is visible")
<http://logger.info|logger.info>("INFO should be visible but is not")
logger.warning("WARNING is not visible either")
return n
env = StreamExecutionEnvironment.get_execution_environment()
source = env.from_collection(range(5), type_info=<http://Types.INT|Types.INT>())
source.map(test_operator).print()
env.execute()