Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f89ac82

Browse filesBrowse files
TrevorEdwardstswast
authored andcommitted
Use logging on the PythonOperator in simple.py (GoogleCloudPlatform#1663)
This allows Airflow to surface the 'Hello World!' output, as PythonOperator does not include STDOUT in its logs.
1 parent 96861aa commit f89ac82
Copy full SHA for f89ac82

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed

‎composer/workflows/simple.py

Copy file name to clipboardExpand all lines: composer/workflows/simple.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
# [END composer_simple_define_dag]
4848
# [START composer_simple_operators]
4949
def greeting():
50-
print('Hello World!')
50+
import logging
51+
logging.info('Hello World!')
5152

5253
# An instance of an operator is called a task. In this case, the
5354
# hello_python task calls the "greeting" Python function.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.