Skip to content

Commit

Permalink
Add log4j.properties to classpath
Browse files Browse the repository at this point in the history
From trino version 359 onwards, log4j and jackson-core jar file is necessary to be
present in classpath of ranger-trino plugin. Along with these changes
log4j.properties file is also necessary to be present in classpath for
the class RangerConfiguration.
  • Loading branch information
aakashnand authored and utk-spartan committed Sep 24, 2021
1 parent 0e5b2f0 commit a19f0c1
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
26 changes: 26 additions & 0 deletions agents-common/src/main/resources/log4j.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#
# 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.
#

# Root logger option
log4j.rootLogger=INFO, stdout

# Direct log messages to stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{10}:%L - %m
2 changes: 2 additions & 0 deletions distro/src/main/assembly/plugin-trino.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@
<include>javax.inject:javax.inject:jar:${javax-inject.version}</include>
<include>org.apache.bval:bval-jsr:jar:${trino.bval-jsr.version}</include>
<include>org.slf4j:slf4j-api:jar:${slf4j-api.version}</include>
<include>log4j:log4j:jar:${log4j.version}</include>
<include>javax.annotation:javax.annotation-api:jar:${javax.annotation-api}</include>
<include>com.fasterxml.jackson.core:jackson-core:jar:${fasterxml.jackson.version}</include>
</includes>
</binaries>
</moduleSet>
Expand Down

0 comments on commit a19f0c1

Please sign in to comment.