You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Jon Stevens <jo...@latchkey.com> on 2000/09/14 10:21:53 UTC
Re: cvs commit: jakarta-velocity/src/java/org/apache/velocity/log
Log.java LogHandle.java LogImpl.java Test.java
on 9/13/2000 10:43 PM, "donaldp@mad.scientist.com"
<do...@mad.scientist.com> wrote:
> I was under the impression that licenses or copyright like
> this is not allowed in Apache projects ?
yep. that copyright needs to be removed.
-jon
--
http://scarab.tigris.org/ | http://noodle.tigris.org/
http://java.apache.org/ | http://java.apache.org/turbine/
http://www.working-dogs.com/ | http://jakarta.apache.org/velocity/
http://www.collab.net/ | http://www.sourcexchange.com/
Re: cvs commit:
jakarta-velocity/src/java/org/apache/velocity/log Log.java
LogHandle.java LogImpl.java Test.java
Posted by Peter Donald <do...@mad.scientist.com>.
At 09:25 14/9/00 -0400, you wrote:
>> Well there is already a logging toolkit in Avalon code base that is
>> basically equivelent to log4j but better designed - thou I am biased as I
>> am writer :P.
>
>+1
>
>Well, heck, then. Problem solved. ;)
>
>I think Jason'n'I both decided that log4j was somewhat over-engineered.
>But if the ASF already has something in-use Elsewhere, I could go with
>using it in More Projects. Commonality is Good.
>
>What's the process for sharing code betwixt projects? Should Logger
>stuff get carved out into a .jar for inclusion? I'd hate to just
>copy/paste files around, as it'd make staying in-sync a tad more
>difficult, eh?
when you build Avalon it builds it into a seperate jar (log.jar) which you
can nab. Avalon is going to have a release Real Soon Now (tm) :P so you
could even get it from that.
Eventually I plan to make a proposal for another Apache project - but too
lazy to do that atm :P. Thers another logging toolkit that may be released
under APL at which point then will try and get it going as seperate project
- until then it is probably best just to nab the jar ???
>D'ya have Logger-For-Newbies docs somewhere handy?
Well not exactly - I used but it got lost :P. Basically for clients of
logging system (ie those who want to use it) you just do something like
import org.apache.log.LogKit;
import org.apache.log.Logger;
public class Blah
{
protected final static boolean LOG = true;
protected final static boolean DEBUG = LOG
&& false;
protected final static Logger LOGGER =
( LOG ) ? LogKit.getLoggerFor( "MyCategory" ) : null;
public void someMethod()
{
if( LOG ) LOGGER.warn("MyWarning", myException );
if( LOG ) LOGGER.error("this does not compute", myException );
if( LOG ) LOGGER.info("infomational messages are here" );
if( LOG ) LOGGER.debug("debug info goes here");
}
Unfortunately for those who initially setup the server system I removed all
auto-configuration stuff right before I put it in CVS because it was an
ugly hack :P. So the best place to look I guess is in in the configuration
file for Avalon (or specifically chunk I paste below) and the code that
loads configuration data (specifically the file at
http://www.working-dogs.com/cvsweb/index.cgi/framework/src/java/org/apache/a
valon/blocks/logmanager/DefaultLogManager.java).
Once the initial configuration is set up it is easy as pie - but that first
bit is a little annoying. I really should fix that :P
----------------------------------------------------------------------------
Configuration file chunk.
----------------------------------------------------------------------------
<global-priority>DEBUG</global-priority>
<category name="core_blocks" target="core_blocks" priority="DEBUG" />
<category name="Kernel" target="kernel" priority="DEBUG" />
<category name="Schedular" target="default" priority="WARN" />
<target name="default" class="org.apache.log.output.FileOutputLogTarget">
<param name="filename" value="../logs/default.log" />
</target>
<target name="kernel" class="org.apache.log.output.FileOutputLogTarget">
<param name="filename" value="../logs/kernel.log" />
<param name="format" value="[%.14{category}]: %{message}\n" />
</target>
<target name="core_blocks" class="org.apache.log.output.FileOutputLogTarget">
<param name="filename" value="../logs/core_blocks.log" />
<param name="format" value="[%.14{category}]: %{message}\n" />
</target>
----------------------------------------------------------------------------
Cheers,
Pete
*------------------------------------------------------*
| "Nearly all men can stand adversity, but if you want |
| to test a man's character, give him power." |
| -Abraham Lincoln |
*------------------------------------------------------*
Re: cvs commit:
jakarta-velocity/src/java/org/apache/velocity/log Log.java LogHandle.java
LogImpl.java Test.java
Posted by Jon Stevens <jo...@latchkey.com>.
on 9/14/2000 6:25 AM, "bob" <bo...@accurev.com> wrote:
>> Well there is already a logging toolkit in Avalon code base that is
>> basically equivelent to log4j but better designed - thou I am biased as I
>> am writer :P.
>
> +1
>
> Well, heck, then. Problem solved. ;)
>
> I think Jason'n'I both decided that log4j was somewhat over-engineered.
> But if the ASF already has something in-use Elsewhere, I could go with
> using it in More Projects. Commonality is Good.
>
> What's the process for sharing code betwixt projects? Should Logger
> stuff get carved out into a .jar for inclusion? I'd hate to just
> copy/paste files around, as it'd make staying in-sync a tad more
> difficult, eh?
>
> D'ya have Logger-For-Newbies docs somewhere handy?
>
> -bob
+1
-jon
--
http://scarab.tigris.org/ | http://noodle.tigris.org/
http://java.apache.org/ | http://java.apache.org/turbine/
http://www.working-dogs.com/ | http://jakarta.apache.org/velocity/
http://www.collab.net/ | http://www.sourcexchange.com/
Re: cvs commit: jakarta-velocity/src/java/org/apache/velocity/log Log.java LogHandle.java LogImpl.java Test.java
Posted by bob <bo...@accurev.com>.
> Well there is already a logging toolkit in Avalon code base that is
> basically equivelent to log4j but better designed - thou I am biased as I
> am writer :P.
+1
Well, heck, then. Problem solved. ;)
I think Jason'n'I both decided that log4j was somewhat over-engineered.
But if the ASF already has something in-use Elsewhere, I could go with
using it in More Projects. Commonality is Good.
What's the process for sharing code betwixt projects? Should Logger
stuff get carved out into a .jar for inclusion? I'd hate to just
copy/paste files around, as it'd make staying in-sync a tad more
difficult, eh?
D'ya have Logger-For-Newbies docs somewhere handy?
-bob
Re: cvs commit:
jakarta-velocity/src/java/org/apache/velocity/log Log.java
LogHandle.java LogImpl.java Test.java
Posted by Peter Donald <do...@mad.scientist.com>.
At 09:05 14/9/00 -0400, you wrote:
>> > I was under the impression that licenses or copyright like
>> > this is not allowed in Apache projects ?
>>
>> yep. that copyright needs to be removed.
>
>This is donated code from a different project. iFleet wants to
>keep their copyright, but are happy to license it under an
>ASF-style license. I wasn't written specifically for Velocity
>or any other ASF project.
>
>So, if we must remove the copyright, then I'm afraid we must
>remove that code. (Though, it's not rocket-science code,
>and could easily be duplicated, but, I like to recycle where-
>ever possible).
Well there is already a logging toolkit in Avalon code base that is
basically equivelent to log4j but better designed - thou I am biased as I
am writer :P.
Source tree via webcvs is at
http://www.working-dogs.com/cvsweb/index.cgi/framework/src/java/org/apache/l
og/
Cheers,
Pete
*------------------------------------------------------*
| "Nearly all men can stand adversity, but if you want |
| to test a man's character, give him power." |
| -Abraham Lincoln |
*------------------------------------------------------*
Re: cvs commit: jakarta-velocity/src/java/org/apache/velocity/log Log.java LogHandle.java LogImpl.java Test.java
Posted by bob <bo...@accurev.com>.
> > I was under the impression that licenses or copyright like
> > this is not allowed in Apache projects ?
>
> yep. that copyright needs to be removed.
This is donated code from a different project. iFleet wants to
keep their copyright, but are happy to license it under an
ASF-style license. I wasn't written specifically for Velocity
or any other ASF project.
So, if we must remove the copyright, then I'm afraid we must
remove that code. (Though, it's not rocket-science code,
and could easily be duplicated, but, I like to recycle where-
ever possible).
-bob