Hi Leonard,
Looks like you are right. bin/zkServer.sh just logs the output to console,
so you should be able to redirect to any file you want. No?
Anyways this is a bug. Please open a jira for it.
Thanks
mahadev
On 10/16/09 11:27 AM, "Leonard Cuff" <lcuff@valueclick.com> wrote:
>
> I should have mentioned in my original email, but I had already tried
> setting ZOO_LOG_DIR as an environment variable. I am using zkServer.sh and I
> see where it passes ZOO_LOG_DIR as a parameter to the java invocation.
>
> java "-Dzookeeper.log.dir=${ZOO_LOG_DIR}"
> "-Dzookeeper.root.logger=${ZOO_LOG4J_PROP}" \
> -cp $CLASSPATH $JVMFLAGS $ZOOMAIN $ZOOCFG &
>
>
> I double checked by echo'ing the value of ZOO_LOG_DIR just before the java
> command. It's set correctly ... but it has no effect on the location of
> zookeeper.log :-(
>
> Leonard
>
> On 10/16/09 11:08 AM, "Mahadev Konar" <mahadev@yahoo-inc.com> wrote:
>
>> Hi Leonard,
>> You should be able to set the ZOO_LOG_DIR as an environment variable to
>> get a different log directory. I think you are using bin/zkServer.sh to
>> start the server?
>>
>> Also, please open a jira for this. It would be good to fix the documentation
>> for this.
>>
>> Thanks
>> mahadev
>>
>>
>> On 10/16/09 11:04 AM, "Leonard Cuff" <lcuff@valueclick.com> wrote:
>>
>>> I¹ve read through the admin manual at
>>> http://hadoop.apache.org/zookeeper/docs/current/zookeeperAdmin.html#sc_loggi
>>> ng
>>> and I don¹t see that there is any way to specify a location for the server¹s
>>> own log file. zookeeper.log appears in the bin directory, regardless of
>>> setting dataDir or dataLogDir in the configuration file. Am I overlooking
>>> something? Is there a way to have this file appear somewhere else?
>>>
>>> TIA,
>>>
>>> Leonard
>>
|