You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by se...@apache.org on 2017/05/11 16:19:20 UTC
[06/13] flink git commit: [hotfix] [gelly] Support log output when
running examples in the IDE
[hotfix] [gelly] Support log output when running examples in the IDE
This adds the dependencies / config files necessary for log output
Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/aafa5794
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/aafa5794
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/aafa5794
Branch: refs/heads/master
Commit: aafa579402c4e1b960e929d1b449505ba820a60a
Parents: bc27963
Author: Stephan Ewen <se...@apache.org>
Authored: Wed May 10 16:39:53 2017 +0200
Committer: Stephan Ewen <se...@apache.org>
Committed: Thu May 11 12:45:52 2017 +0200
----------------------------------------------------------------------
flink-libraries/flink-gelly-examples/pom.xml | 15 ++++++++++
.../src/main/resources/log4j.properties | 23 ++++++++++++++++
.../src/main/resources/logback.xml | 29 ++++++++++++++++++++
3 files changed, 67 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flink/blob/aafa5794/flink-libraries/flink-gelly-examples/pom.xml
----------------------------------------------------------------------
diff --git a/flink-libraries/flink-gelly-examples/pom.xml b/flink-libraries/flink-gelly-examples/pom.xml
index 6fb0979..009781f 100644
--- a/flink-libraries/flink-gelly-examples/pom.xml
+++ b/flink-libraries/flink-gelly-examples/pom.xml
@@ -75,6 +75,21 @@
<scope>compile</scope>
</dependency>
+ <!-- Add a logging Framework, to make the examples produce -->
+ <!-- logs when executing in the IDE -->
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <scope>compile</scope>
+ </dependency>
+
<!-- test dependencies -->
<dependency>
http://git-wip-us.apache.org/repos/asf/flink/blob/aafa5794/flink-libraries/flink-gelly-examples/src/main/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/flink-libraries/flink-gelly-examples/src/main/resources/log4j.properties b/flink-libraries/flink-gelly-examples/src/main/resources/log4j.properties
new file mode 100644
index 0000000..da32ea0
--- /dev/null
+++ b/flink-libraries/flink-gelly-examples/src/main/resources/log4j.properties
@@ -0,0 +1,23 @@
+################################################################################
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+################################################################################
+
+log4j.rootLogger=INFO, console
+
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+log4j.appender.console.layout=org.apache.log4j.PatternLayout
+log4j.appender.console.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p %-60c %x - %m%n
http://git-wip-us.apache.org/repos/asf/flink/blob/aafa5794/flink-libraries/flink-gelly-examples/src/main/resources/logback.xml
----------------------------------------------------------------------
diff --git a/flink-libraries/flink-gelly-examples/src/main/resources/logback.xml b/flink-libraries/flink-gelly-examples/src/main/resources/logback.xml
new file mode 100644
index 0000000..95f2d04
--- /dev/null
+++ b/flink-libraries/flink-gelly-examples/src/main/resources/logback.xml
@@ -0,0 +1,29 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<configuration>
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <encoder>
+ <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{60} %X{sourceThread} - %msg%n</pattern>
+ </encoder>
+ </appender>
+
+ <root level="INFO">
+ <appender-ref ref="STDOUT"/>
+ </root>
+</configuration>
\ No newline at end of file