Skip to content

Commit

Permalink
[hotfix][docs][conf] Setup logging for generator
Browse files Browse the repository at this point in the history
  • Loading branch information
zentol committed Feb 15, 2020
1 parent 3259270 commit a589467
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
2 changes: 2 additions & 0 deletions flink-docs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,12 @@ under the License.
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<scope>compile</scope>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
import org.apache.flink.util.TimeUtils;
import org.apache.flink.util.function.ThrowingConsumer;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.IOException;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
Expand Down Expand Up @@ -59,6 +62,8 @@
*/
public class ConfigOptionsDocGenerator {

private static final Logger LOG = LoggerFactory.getLogger(ConfigOptionsDocGenerator.class);

static final OptionsClassLocation[] LOCATIONS = new OptionsClassLocation[]{
new OptionsClassLocation("flink-core", "org.apache.flink.configuration"),
new OptionsClassLocation("flink-runtime", "org.apache.flink.runtime.shuffle"),
Expand Down
24 changes: 24 additions & 0 deletions flink-docs/src/main/resources/log4j.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
################################################################################
# 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:https://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.logger.org.apache.flink.docs.configuration.ConfigOptionsDocGenerator= INFO, logger

log4j.appender.logger=org.apache.log4j.ConsoleAppender
log4j.appender.logger.target = System.out
log4j.appender.logger.layout=org.apache.log4j.PatternLayout
log4j.appender.logger.layout.ConversionPattern=%-5p - %m%n

0 comments on commit a589467

Please sign in to comment.