debian/0000755000000000000000000000000012137267640007176 5ustar debian/libexcalibur-logkit-java-doc.doc-base0000644000000000000000000000036411572512506016212 0ustar Document: libexcalibur-logkit-java Title: API documentation for libexcalibur-logkit-java Section: Programming Format: HTML Index: /usr/share/doc/libexcalibur-logkit-java/api/index.html Files: /usr/share/doc/libexcalibur-logkit-java/api/*.html debian/libexcalibur-logkit-java.poms0000644000000000000000000000001711704714215014741 0ustar debian/pom.xml debian/watch0000644000000000000000000000017112137267554010232 0ustar version=2 http://archive.apache.org/dist/excalibur/excalibur-logkit/source/excalibur-logkit-([\d\.]+).dev.*-src\.tar\.gz debian/rules0000755000000000000000000000133212137267554010261 0ustar #!/usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/ant.mk JAVA_HOME_DIRS := /usr/lib/jvm/default-java DEB_JARS := ant-junit geronimo-jms-1.1-spec gnumail.jar junit log4j-1.2 servlet-api-3.0 DEB_ANT_BUILD_TARGET := dist DEB_ANT_ARGS := -Dnoget=true -Dfinal.name=excalibur-logkit -Dant.build.javac.source=1.4 -Dant.build.javac.target=1.4 -Dlibdir=/usr/share/java install/libexcalibur-logkit-java:: mh_installpoms -plibexcalibur-logkit-java -e$(DEB_UPSTREAM_VERSION) jh_classpath -plibexcalibur-logkit-java target/excalibur-logkit.jar mh_installjar -plibexcalibur-logkit-java -e$(DEB_UPSTREAM_VERSION) -l \ debian/pom.xml target/excalibur-logkit.jar clean:: mh_clean debian/changelog0000644000000000000000000000776012137267554011066 0ustar excalibur-logkit (2.0-10) unstable; urgency=low * Team upload. * Fixed the watch file * Updated standards version to 3.9.4 (no changes) * Updated the dependency on the Servlet API (2.5 -> 3.0) * Removed the obsolete instructions in README.source for handling the patches * debian/copyright: Updated the Format URI * debian/rules: Added a clean target to allow rebuilds -- Emmanuel Bourg Sun, 28 Apr 2013 01:01:35 +0200 excalibur-logkit (2.0-9) unstable; urgency=low [ Miguel Landaeta ] * Team upload. [ James Page ] * Fix FTBFS with OpenJDK7 (LP: #888124) (Closes: #652049): - d/patches/01_implement_abstract_methods.patch: add additional unimplemented abstract methods for Java 7. * d/copyright: tidied up misc lintian warnings. -- Miguel Landaeta Tue, 20 Dec 2011 21:47:08 -0430 excalibur-logkit (2.0-8) unstable; urgency=low * Team upload. * Add Conflicts and Provides for liblogkit-java to support upgrades from oldstable. (Closes: #642742) -- Torsten Werner Sat, 24 Sep 2011 23:29:22 +0200 excalibur-logkit (2.0-7) unstable; urgency=low * Team upload. * Add a compatibility symlink excalibur-logkit.jar. -- Torsten Werner Fri, 16 Sep 2011 23:58:48 +0200 excalibur-logkit (2.0-6) unstable; urgency=low * Team upload. * Add pom.xml and use maven-repo-helper for installation. -- Torsten Werner Thu, 15 Sep 2011 11:48:44 +0200 excalibur-logkit (2.0-5) unstable; urgency=low * Use libgeronimo-jms-1.1-spec-java instead of libjboss-j2ee-java as build dependency. * Use javahelper to install files and set classpath/dependencies. * Add -doc package containing API documentation. * Add DEP-3 headers to all patches. * Update standards version to 3.9.2. -- Onkar Shinde Sun, 29 May 2011 09:36:55 +0530 excalibur-logkit (2.0-4) unstable; urgency=low * Servlet 2.5 transition: Also runtime-depend on libservlet2.5-java -- Thierry Carrez Tue, 08 Jun 2010 17:39:05 +0200 excalibur-logkit (2.0-3) unstable; urgency=low * Team upload. * Switch to servlet API 2.5. * Switch to source format 3.0. * Update Standards-Version: 3.8.4. -- Torsten Werner Mon, 03 May 2010 20:23:36 +0200 excalibur-logkit (2.0-2) unstable; urgency=low * Remove libgeronimo-jms-1.1-spec-java from build dependencies. The package does not exist in Debian archive. (Closes: #549838) -- Onkar Shinde Wed, 07 Oct 2009 19:14:59 +0530 excalibur-logkit (2.0-1) unstable; urgency=low * Merge from Ubuntu. (Closes: #541111) * debian/control - Set maintainer to Debian Java Maintainers. Add myself as uploader. - Add alternate build and runtime dependency on libjboss-j2ee-java as the geronimo package is not present in Debian yet. - Add Vcs-* fields. * debian/rules - Add jboss-j2ee to DEB_JARS. * debian/patches/04_disable_unit_test.patch - Disable a unit test that fails randomly. -- Onkar Shinde Wed, 12 Aug 2009 00:34:29 +0530 excalibur-logkit (2.0-0ubuntu3) karmic; urgency=low * debian/copyright - Add separate 'License' section as same license applies to all the files. -- Onkar Shinde Tue, 21 Jul 2009 14:45:25 +0530 excalibur-logkit (2.0-0ubuntu2) karmic; urgency=low * debian/patches - 03_add_constructor.patch * Add construtor, taken from upstream svn, to SMTPOutputLogTarget.java. Needed by excalibur-logger. -- Onkar Shinde Thu, 16 Jul 2009 01:23:53 +0530 excalibur-logkit (2.0-0ubuntu1) karmic; urgency=low * Initial release. * debian/patches - 01_implement_abstract_methods.patch * Implement methods 'unwrap', 'isWrapperFor', throw UnsupportedOperationException. - 02_fix_build_xml.patch * Fix two problems in build.xml. -- Onkar Shinde Fri, 10 Jul 2009 02:31:21 +0530 debian/libexcalibur-logkit-java.jlibs0000644000000000000000000000003411572512506015067 0ustar target/excalibur-logkit.jar debian/patches/0000755000000000000000000000000012137267640010625 5ustar debian/patches/02_fix_build_xml.patch0000644000000000000000000000340512137267554015002 0ustar Description: Fix some problems in build.xml and link against system installed javadocs. Forwarded: not-needed Author: Onkar Shinde --- a/build.xml +++ b/build.xml @@ -64,7 +64,7 @@ - + @@ -105,12 +105,12 @@ - + @@ -204,6 +204,10 @@ + + + + @@ -228,4 +232,4 @@ - \ No newline at end of file + debian/patches/01_implement_abstract_methods.patch0000644000000000000000000000237011704714215017542 0ustar Description: Add method stubs to build against current APIs. Forwarded: not-needed Author: Onkar Shinde , James page Index: excalibur-logkit/src/java/org/apache/log/output/db/DefaultDataSource.java =================================================================== --- excalibur-logkit.orig/src/java/org/apache/log/output/db/DefaultDataSource.java 2011-11-25 10:55:37.000000000 +0000 +++ excalibur-logkit/src/java/org/apache/log/output/db/DefaultDataSource.java 2011-11-25 10:59:19.640362541 +0000 @@ -20,6 +20,8 @@ import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; +import java.sql.SQLFeatureNotSupportedException; +import java.util.logging.Logger; import javax.sql.DataSource; /** @@ -111,4 +113,20 @@ { m_logWriter = logWriter; } + + public Object unwrap(Class iface) throws java.sql.SQLException + { + throw new UnsupportedOperationException(); + } + + public boolean isWrapperFor(Class iface) throws java.sql.SQLException + { + throw new UnsupportedOperationException(); + } + + public Logger getParentLogger() throws SQLFeatureNotSupportedException + { + throw new SQLFeatureNotSupportedException(); + } + } debian/patches/series0000644000000000000000000000015711572512506012041 0ustar 01_implement_abstract_methods.patch 02_fix_build_xml.patch 03_add_constructor.patch 04_disable_unit_test.patch debian/patches/04_disable_unit_test.patch0000644000000000000000000000130011572512506015640 0ustar Description: Disable a junit test that fails randomly. Forwarded: not-needed Author: Onkar Shinde --- a/src/test/org/apache/log/output/test/RevolvingFileStrategyTestCase.java 2011-05-29 14:53:26.000000000 +0530 +++ b/src/test/org/apache/log/output/test/RevolvingFileStrategyTestCase.java 2011-05-29 14:56:26.000000000 +0530 @@ -152,6 +152,7 @@ assertEquals( "rotation", 5, strategy.getCurrentRotation() ); } + /* public void testFullRotation() throws Exception { @@ -172,6 +173,7 @@ assertEquals( "rotation", 0, strategy.getCurrentRotation() ); } + */ public void testFullRotationWithOlder() throws Exception debian/patches/03_add_constructor.patch0000644000000000000000000001556111572512506015351 0ustar Description: Patch from upstream CVS to fix building of excalibur-logger against this package. Forwarded: not-needed Author: Onkar Shinde --- a/src/java/org/apache/log/output/net/SMTPOutputLogTarget.java 2011-05-29 14:56:34.000000000 +0530 +++ b/src/java/org/apache/log/output/net/SMTPOutputLogTarget.java 2011-05-29 14:56:59.000000000 +0530 @@ -58,6 +58,23 @@ // Buffer containing current mail private StringBuffer m_buffer; + + /** The time that the first log entry in the current buffer arrived. */ + private long m_bufferTime; + + /** The maximun delay that a message will be allowed to wait in the queue + * before being sent. */ + private long m_maxDelayTime; + + /** Runner thread which is responsible for sending batched log entries in + * the background. */ + private Thread m_runner; + + /** Flag which will be set in the close method when it is time to shutdown. */ + private boolean m_shutdown; + + /** Flag which controls whether debug is enabled for each message. */ + private boolean m_debug; /** SMTPOutputLogTarget constructor. * @@ -68,7 +85,17 @@ * @param toAddresses addresses logs should be sent to * @param fromAddress address logs say they come from * @param subject subject line logs should use - * @param maxMsgSize maximum size of any log mail, in units of log events + * @param maxMsgSize maximum size of any log mail, in units of log events. + * If this is greater than one but maxDelayTime is 0 then + * log events may stay queued for a long period of time + * if less than the specified number of messages are + * logged. Any unset messages will be sent when the + * target is closed. + * @param maxDelayTime specifies the longest delay in seconds that a log + * entry will be queued before being sent. Setting + * this to a value larger than 0 will cause a + * background thread to be used to queue up and send + * messages. Ignored if maxMsgSize is 1 or less. * @param formatter log formatter to use */ public SMTPOutputLogTarget( @@ -77,6 +104,7 @@ final Address fromAddress, final String subject, final int maxMsgSize, + final int maxDelayTime, final Formatter formatter ) { super( formatter ); @@ -87,11 +115,103 @@ m_fromAddress = fromAddress; m_subject = subject; m_session = session; + m_maxDelayTime = maxDelayTime * 1000; + + if ( ( m_maxDelayTime > 0 ) && ( m_maxMsgSize > 1 ) ) + { + // Create a runner thread which will + m_runner = new Thread( "SMTPOutputLogTarget_Queue_Daemon" ) + { + public void run() + { + try + { + //System.out.println( "SMTPOutputLogTarget runner Started." ); + synchronized( SMTPOutputLogTarget.this ) + { + try + { + do + { + // Wait up to a second for notification that a message is + // available. + try + { + SMTPOutputLogTarget.this.wait( 1000 ); + } + catch ( InterruptedException e ) + { + // Ignore. + } + + // Is a message waiting? + if ( m_message != null ) + { + // Is the message big enough to send or been + // waiting long enough? + long now = System.currentTimeMillis(); + if ( m_shutdown || ( m_msgSize >= m_maxMsgSize ) || + ( now - m_bufferTime >= m_maxDelayTime ) ) + { + // Time to send the message. + send(); + } + } + } + while ( !m_shutdown ); + } + finally + { + //System.out.println( "SMTPOutputLogTarget runner Completed." ); + m_runner = null; + + // The close method waits for this to complete. + SMTPOutputLogTarget.this.notifyAll(); + } + } + } + catch ( Throwable t ) + { + getErrorHandler().error( + "Unexpected error in the SMTPOutputLogTarget queue daemon", t, null ); + } + } + }; + m_runner.setDaemon( true ); + m_runner.start(); + } // ready for business open(); } + /** SMTPOutputLogTarget constructor. + * + * It creates a logkit output target capable of logging to SMTP + * (ie. email, email gateway) targets. + * + * @param session mail session to be used + * @param toAddresses addresses logs should be sent to + * @param fromAddress address logs say they come from + * @param subject subject line logs should use + * @param maxMsgSize maximum size of any log mail, in units of log events. + * Log events may stay queued for a long period of time + * if less than the specified number of messages are + * logged. Any unset messages will be sent when the + * target is closed. + * @param formatter log formatter to use + */ + public SMTPOutputLogTarget( + final Session session, + final Address[] toAddresses, + final Address fromAddress, + final String subject, + final int maxMsgSize, + final Formatter formatter ) + { + this( session, toAddresses, fromAddress, subject, maxMsgSize, 0, formatter ); + } + /** Method to write data to the log target. * * Logging data is stored in debian/libexcalibur-logkit-java.links0000644000000000000000000000012111704714215015077 0ustar # compat symlink /usr/share/java/logkit.jar /usr/share/java/excalibur-logkit.jar debian/source/0000755000000000000000000000000012137267640010476 5ustar debian/source/format0000644000000000000000000000001411572512506011700 0ustar 3.0 (quilt) debian/libexcalibur-logkit-java-doc.install0000644000000000000000000000006611572512506016202 0ustar dist/docs/api usr/share/doc/libexcalibur-logkit-java/ debian/compat0000644000000000000000000000000211572512506010370 0ustar 5 debian/copyright0000644000000000000000000000100112137267554011125 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: excalibur-logkit Upstream-Contact: The Apache Software Foundation Source: http://excalibur.apache.org Files: * Copyright: 1999-2004, The Apache Software Foundation License: Apache-2.0 Files: debian/* Copyright: 2009, Onkar Shinde License: Apache-2.0 License: Apache-2.0 On Debian systems the full text of the Apache-2.0 license can be found in the `/usr/share/common-licenses/Apache-2.0' file. debian/pom.xml0000644000000000000000000000022011704714215010477 0ustar 4.0.0 logkit logkit 2.0 debian/libexcalibur-logkit-java.classpath0000644000000000000000000000013011572512506015743 0ustar usr/share/java/excalibur-logkit.jar geronimo-jms-1.1-spec.jar gnumail.jar log4j-1.2.jar debian/control0000644000000000000000000000315112137267554010605 0ustar Source: excalibur-logkit Section: java Priority: optional Maintainer: Debian Java Maintainers Uploaders: Onkar Shinde , Emmanuel Bourg Build-Depends: debhelper (>=5), cdbs, javahelper, ant Build-Depends-Indep: default-jdk, default-jdk-doc, ant-optional, junit, libgeronimo-jms-1.1-spec-java, libgnumail-java, liblog4j1.2-java, libservlet3.0-java, libgnumail-java-doc, liblog4j1.2-java-doc, libservlet3.0-java-doc, maven-repo-helper Standards-Version: 3.9.4 Vcs-Svn: svn://svn.debian.org/pkg-java/trunk/excalibur-logkit/ Vcs-Browser: http://svn.debian.org/viewsvn/pkg-java/trunk/excalibur-logkit/ Homepage: http://excalibur.apache.org/ Package: libexcalibur-logkit-java Architecture: all Depends: ${misc:Depends}, ${java:Depends} Conflicts: liblogkit-java Replaces: liblogkit-java Description: Lightweight and fast designed logging toolkit for Java Excalibur Logkit (previously avalon logkit) is a lightweight, fast, securely designed logging toolkit. It is designed to integrate into existing applications. Logkit is more lightweight than Log4j. . This package contains the library jar. Package: libexcalibur-logkit-java-doc Section: doc Architecture: all Depends: ${misc:Depends} Recommends: ${java:Recommends} Description: Lightweight and fast designed logging toolkit for Java (API docs) Excalibur Logkit (previously avalon logkit) is a lightweight, fast, securely designed logging toolkit. It is designed to integrate into existing applications. Logkit is more lightweight than Log4j. . This package contains the API documentation.