Hi,

I wanted to have logging in tomcat, but currently using
juli/java.util.logging i am having a file with date in it (for example
catalina.11.12.2013.log) , i am unable to remove date as my additional
requirement is that i have to include daily rollover of the file.

Alternatively i have tried this using log4j by following the documentation.
I was able to get the log working properly if i start my tomcat using
startup,sh. But i am starting tomcat from an ant script in the following
way which is not at all forming the log. Can i be helped on this.

 <path id="tomcat.classpath">
                <fileset dir="${tomcat.dir}/lib/">
                        <patternset>
                                <include name="**/*.jar" />
                                <include name="**/*.zip" />
                        </patternset>
                </fileset>
                <pathelement location="${tomcat.dir}/bin/bootstrap.jar" />
                <pathelement location="${tomcat.dir}/bin/tomcat-juli.jar" />
        </path>
 <target name="tomcat-start" depends="tomcat-check-status"
unless="tomcat.started">
 <java classname="org.apache.catalina.startup.Bootstrap" fork="true"
spawn="true" classpathref="tomcat.classpath">
                        <jvmarg
value="-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager" />
                        <jvmarg
value="-Djava.util.logging.config.file=${tomcat.dir}/conf/logging.properties"
/>
                        <jvmarg value="-Dcatalina.base=${tomcat.dir}"/>

                        <jvmarg value="-Xms${host.jvm.heap.min}" />
                        <jvmarg value="-Xmx${host.jvm.heap.max}" />
                        <jvmarg value="-XX:PermSize=${host.jvm.perm.min}"/>
                        <jvmarg
value="-XX:MaxPermSize=${host.jvm.perm.max}" />
                        <jvmarg value="-Dcatalina.home=${tomcat.dir}" />
                        <jvmarg
value="-Dcom.sun.management.jmxremote.port=1099"/>
                        <jvmarg
value="-Dcom.sun.management.jmxremote.ssl=false"/>
                        <jvmarg
value="-Dcom.sun.management.jmxremote.authenticate=false"/>

                </java>
</target>


Any help is appreciated.

Thanks & Regards,
Shashank

Reply via email to