[ 
https://issues.apache.org/jira/browse/HIVE-20283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16564516#comment-16564516
 ] 

Jaume M commented on HIVE-20283:
--------------------------------

In this case starting with 
{code}
hive --service metastore --hiveconf hive.root.logger=INFO,console
{code}
splits the logs in the main console and in sends some to /tmp/user/hive.log.

This case is different than for HiveServer2 because currently [here | 
https://github.com/apache/hive/blob/master/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java#L9103]
 the file will be found since in /bin.hive we do 
{code}
export HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS 
-Dlog4j.configurationFile=hive-log4j2.properties "
{code}

so {{LogUtils.initHiveLog4j(conf);}} is not called as in HiveServer2. Setting 
{{hive.root.logger = INFO,console}} in hive-site.xml is therefore (always?) 
ignored and also setting it with 
{{HADOOP_CLIENT_OPTS=-Dhive.root.logger=INFO,console }} doesn't work.

However {{HADOOP_CLIENT_OPTS=-Dhive.root.logger=console }} works.

I think the best options here is to throw an exception and ask the user to fill 
hive-log4j2.properties, wdyt [~prasanth_j] [~kgyrtkirk] ?


> Logs may be directed to 2 files if --hiveconf hive.log.file is used 
> (metastore)
> -------------------------------------------------------------------------------
>
>                 Key: HIVE-20283
>                 URL: https://issues.apache.org/jira/browse/HIVE-20283
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Jaume M
>            Assignee: Jaume M
>            Priority: Major
>
> Unfortunately when doing this : 
> https://issues.apache.org/jira/browse/HIVE-19886 I forgot to do it as well 
> for the metastore



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to