|
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 -- Leonard Cuff [hidden email] ³This email and any files included with it may contain privileged, proprietary and/or confidential information that is for the sole use of the intended recipient(s). Any disclosure, copying, distribution, posting, or use of the information contained in or attached to this email is prohibited unless permitted by the sender. If you have received this email in error, please immediately notify the sender via return e-mail, telephone, or fax and destroy this original transmission and its included files without reading or saving it in any manner. Thank you.² This email and any files included with it may contain privileged, proprietary and/or confidential information that is for the sole use of the intended recipient(s). Any disclosure, copying, distribution, posting, or use of the information contained in or attached to this email is prohibited unless permitted by the sender. If you have received this email in error, please immediately notify the sender via return email, telephone, or fax and destroy this original transmission and its included files without reading or saving it in any manner. Thank you. |
|
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" <[hidden email]> 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 |
|
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" <[hidden email]> 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" <[hidden email]> 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 > -- Leonard Cuff [hidden email] ³This email and any files included with it may contain privileged, proprietary and/or confidential information that is for the sole use of the intended recipient(s). Any disclosure, copying, distribution, posting, or use of the information contained in or attached to this email is prohibited unless permitted by the sender. If you have received this email in error, please immediately notify the sender via return e-mail, telephone, or fax and destroy this original transmission and its included files without reading or saving it in any manner. Thank you.² This email and any files included with it may contain privileged, proprietary and/or confidential information that is for the sole use of the intended recipient(s). Any disclosure, copying, distribution, posting, or use of the information contained in or attached to this email is prohibited unless permitted by the sender. If you have received this email in error, please immediately notify the sender via return email, telephone, or fax and destroy this original transmission and its included files without reading or saving it in any manner. Thank you. |
|
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" <[hidden email]> 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" <[hidden email]> 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" <[hidden email]> 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 >> |
|
Your comment that the output goes to the console made me realize this is
configurable via the log4jproperties file, and that I'd configured it long ago and forgotten that I'd done so. Thanks for your attention. Leonard On 10/16/09 11:35 AM, "Mahadev Konar" <[hidden email]> wrote: > 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" <[hidden email]> 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" <[hidden email]> 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" <[hidden email]> wrote: >>> >>>> I¹ve read through the admin manual at >>>> i >>>> 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 >>> > -- Leonard Cuff [hidden email] ³This email and any files included with it may contain privileged, proprietary and/or confidential information that is for the sole use of the intended recipient(s). Any disclosure, copying, distribution, posting, or use of the information contained in or attached to this email is prohibited unless permitted by the sender. If you have received this email in error, please immediately notify the sender via return e-mail, telephone, or fax and destroy this original transmission and its included files without reading or saving it in any manner. Thank you.² This email and any files included with it may contain privileged, proprietary and/or confidential information that is for the sole use of the intended recipient(s). Any disclosure, copying, distribution, posting, or use of the information contained in or attached to this email is prohibited unless permitted by the sender. If you have received this email in error, please immediately notify the sender via return email, telephone, or fax and destroy this original transmission and its included files without reading or saving it in any manner. Thank you. |
|
In reply to this post by Mahadev Konar
Sorry some misinformation from my side.
You can actually change the log4j properties to get it to write to a file. Using the following in your log4j properties file log4j.rootLogger=INFO, FILE log4j.appender.FILE=org.apache.log4j.FileAppender log4j.appender.FILE.File={$dir}/zoo.log log4j.appender.FILE.layout=org.apache.log4j.PatternLayout log4j.appender.FILE.layout.ConversionPattern=%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n Will let you log to the output directory $dir. Hope that helps! mahadev On 10/16/09 11:35 AM, "Mahadev Konar" <[hidden email]> wrote: > 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" <[hidden email]> 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" <[hidden email]> 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" <[hidden email]> wrote: >>> >>>> I¹ve read through the admin manual at >>>> i >>>> 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 >>> > |
|
In reply to this post by Leonard Cuff
I just realized that as well :)
Sent out an email already! mahadev On 10/16/09 11:56 AM, "Leonard Cuff" <[hidden email]> wrote: > Your comment that the output goes to the console made me realize this is > configurable via the log4jproperties file, and that I'd configured it long > ago and forgotten that I'd done so. > > Thanks for your attention. > > Leonard > > > On 10/16/09 11:35 AM, "Mahadev Konar" <[hidden email]> wrote: > >> 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" <[hidden email]> 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" <[hidden email]> 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" <[hidden email]> wrote: >>>> >>>>> I¹ve read through the admin manual at >>>>> > > > i >>>>> 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 >>>> >> |
|
In reply to this post by Mahadev Konar
Hello
In that case, what is the purpose of zookeeper.log.dir property ? Thanks |
|
It allows you to set the log directory programmatically -- i.e.
without having to edit the log4j.properties file. Patrick On Wed, Oct 24, 2012 at 3:06 PM, sanjeev <[hidden email]> wrote: > Hello > > In that case, what is the purpose of zookeeper.log.dir property ? > > Thanks > > > > -- > View this message in context: http://zookeeper-user.578899.n2.nabble.com/specifying-the-location-of-zookeeper-log-tp3837244p7578132.html > Sent from the zookeeper-user mailing list archive at Nabble.com. |
| Powered by Nabble | Edit this page |
