You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by ge...@apache.org on 2001/09/09 09:26:24 UTC

cvs commit: jakarta-velocity/examples/logger_example LoggerExample.java

geirm       01/09/09 00:26:24

  Modified:    examples/event_example EventExample.java
               examples/logger_example LoggerExample.java
  Log:
  Small fixes to reflect the new needs of LogSystem due to
  separate instances.
  
  Revision  Changes    Path
  1.3       +11 -1     jakarta-velocity/examples/event_example/EventExample.java
  
  Index: EventExample.java
  ===================================================================
  RCS file: /home/cvs/jakarta-velocity/examples/event_example/EventExample.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- EventExample.java	2001/05/20 21:08:12	1.2
  +++ EventExample.java	2001/09/09 07:26:24	1.3
  @@ -61,6 +61,7 @@
   import org.apache.velocity.exception.MethodInvocationException;
   
   import org.apache.velocity.runtime.log.LogSystem;
  +import org.apache.velocity.runtime.RuntimeServices;
   
   import org.apache.velocity.app.event.EventCartridge;
   import org.apache.velocity.app.event.ReferenceInsertionEventHandler;
  @@ -76,7 +77,7 @@
    *   when testing the NullSetEventHandler
    *
    * @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
  - * @version $Id: EventExample.java,v 1.2 2001/05/20 21:08:12 geirm Exp $
  + * @version $Id: EventExample.java,v 1.3 2001/09/09 07:26:24 geirm Exp $
    */
   
   public class EventExample implements ReferenceInsertionEventHandler, 
  @@ -333,6 +334,15 @@
   
           throw e;
       } 
  +
  +	/**
  +	 *  Required init method for LogSystem
  +	 *  to get access to RuntimeServices
  +	 */ 
  +	 public void init( RuntimeServices rs )
  +	 {
  +	 	return;
  +	 }
   
       /**
        *  This is the key method needed to implement a logging interface
  
  
  
  1.2       +12 -1     jakarta-velocity/examples/logger_example/LoggerExample.java
  
  Index: LoggerExample.java
  ===================================================================
  RCS file: /home/cvs/jakarta-velocity/examples/logger_example/LoggerExample.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LoggerExample.java	2001/03/19 23:01:37	1.1
  +++ LoggerExample.java	2001/09/09 07:26:24	1.2
  @@ -54,7 +54,9 @@
   
   import org.apache.velocity.app.Velocity;
   import org.apache.velocity.runtime.log.LogSystem;
  +import org.apache.velocity.runtime.RuntimeServices;
   
  +
   /**
    *  This is a toy demonstration of how Velocity
    *  can use an externally configured logger.  In 
  @@ -64,7 +66,7 @@
    *  through it.
    *
    * @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
  - * @version $Id: LoggerExample.java,v 1.1 2001/03/19 23:01:37 geirm Exp $
  + * @version $Id: LoggerExample.java,v 1.2 2001/09/09 07:26:24 geirm Exp $
    */
   public class LoggerExample implements LogSystem
   {
  @@ -92,6 +94,15 @@
           }
       }
   
  +	/**
  +	 *  Required init() method for LogSystem
  +	 *  to get access to RuntimeServices
  +	 */ 
  +	 public void init( RuntimeServices rs )
  +	 {
  +	 	return;
  +	 }
  +	 
       /**
        *  This is the key method needed to implement a logging interface
        *  for Velocity.
  
  
  

Re: cvs commit: jakarta-velocity/examples/logger_example LoggerExample.java

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 9/9/01 11:16 AM, "Jon Stevens" <jo...@latchkey.com> wrote:

> on 9/9/01 2:06 PM, "Geir Magnusson Jr." <ge...@optonline.net> wrote:
> 
>> I have a love-hate relationship with this iBook right now.  The above falls
>> on the 'love' side :)
>> 
>> Anyone have any problems using IE under the 10.0.4 accessing localhost?  I
>> tried to hit tomcat, and it said it couldn't.  When I did it with telnet and
>> typed in the request, it worked fine.
>> 
>> geir
> 
> Nope. I haven't had any problems. What does:
> 
> nslookup localhost
> 
> return?
> 
> Also, you have to remember to put in a port number if Tomcat is running on a
> port other than 80.
> 
>   http://localhost:8080/
> 
> Also, another decent browser to try is the Opera browser. You may like it
> better than IE.
> 
> Hope that helps.

Thanks.

I love Opera (for Linux) - will try on OSX.

I did just get it to work - I am now connected via dialup, so on a lark, I
tried the dialup IP and all is fine.

There is this notion of 'location' - maybe I didn't have the location set to
'nothing' (an entry with no devices) it made a difference?  Something to
test this evening after dinner.

Off to the beach again...

Have a good 
-- 
Geir Magnusson Jr.     geirm@optonline.net
System and Software Consulting
Developing for the web?  See http://jakarta.apache.org/velocity/
If you look up, there are no limits - Japanese Proverb


Re: cvs commit: jakarta-velocity/examples/logger_example LoggerExample.java

Posted by Jon Stevens <jo...@latchkey.com>.
on 9/9/01 2:06 PM, "Geir Magnusson Jr." <ge...@optonline.net> wrote:

> I have a love-hate relationship with this iBook right now.  The above falls
> on the 'love' side :)
> 
> Anyone have any problems using IE under the 10.0.4 accessing localhost?  I
> tried to hit tomcat, and it said it couldn't.  When I did it with telnet and
> typed in the request, it worked fine.
> 
> geir

Nope. I haven't had any problems. What does:

nslookup localhost

return?

Also, you have to remember to put in a port number if Tomcat is running on a
port other than 80.

    http://localhost:8080/

Also, another decent browser to try is the Opera browser. You may like it
better than IE.

Hope that helps.

-jon


Re: cvs commit: jakarta-velocity/examples/logger_example LoggerExample.java

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 9/9/01 11:00 AM, "Jon Stevens" <jo...@latchkey.com> wrote:

> on 9/9/01 1:51 PM, "Geir Magnusson Jr." <ge...@optonline.net> wrote:
> 
>> Done.
>> 
>> (Back to the beach to untab the commit I was about to do :)
>> 
>> Geir
> 
> Save this as an AppleScript (using the Script Editor application) in your
> "BBEdit Support/Scripts" directory:
> 
> tell application "BBEdit 6.1"
>   activate
>   detab text 1 of text window 1 tab width 4
> end tell
> 
> Then open the file in bbedit, run the script from the scripting menu and you
> are done. :-)

I have a love-hate relationship with this iBook right now.  The above falls
on the 'love' side :)

Anyone have any problems using IE under the 10.0.4 accessing localhost?  I
tried to hit tomcat, and it said it couldn't.  When I did it with telnet and
typed in the request, it worked fine.

geir

-- 
Geir Magnusson Jr.     geirm@optonline.net
System and Software Consulting
Developing for the web?  See http://jakarta.apache.org/velocity/
If you look up, there are no limits - Japanese Proverb


Re: cvs commit: jakarta-velocity/examples/logger_example LoggerExample.java

Posted by Jon Stevens <jo...@latchkey.com>.
on 9/9/01 1:51 PM, "Geir Magnusson Jr." <ge...@optonline.net> wrote:

> Done.
> 
> (Back to the beach to untab the commit I was about to do :)
> 
> Geir

Save this as an AppleScript (using the Script Editor application) in your
"BBEdit Support/Scripts" directory:

tell application "BBEdit 6.1"
    activate
    detab text 1 of text window 1 tab width 4
end tell

Then open the file in bbedit, run the script from the scripting menu and you
are done. :-)

-jon


Re: cvs commit: jakarta-velocity/examples/logger_example LoggerExample.java

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 9/9/01 10:04 AM, "Jon Stevens" <jo...@latchkey.com> wrote:

> on 9/9/01 12:26 AM, "geirm@apache.org" <ge...@apache.org> wrote:
> 
>> +
>> +    /**
>> +     *  Required init method for LogSystem
>> +     *  to get access to RuntimeServices
>> +     */ 
>> +     public void init( RuntimeServices rs )
>> +     {
>> +         return;
>> +     }
> 
> This commit has tabs in it.

Whoops - I thought I had that set.
 
> Geir, in BBEdit, you can turn of tabs by doing this:
> 
> Edit->Preferences->Editor Defaults->Auto-Expand Tabs (make it checked)
> 

Done.

(Back to the beach to untab the commit I was about to do :)

Geir

-- 
Geir Magnusson Jr.     geirm@optonline.net
System and Software Consulting
Developing for the web?  See http://jakarta.apache.org/velocity/
If you look up, there are no limits - Japanese Proverb


Re: cvs commit: jakarta-velocity/examples/logger_example LoggerExample.java

Posted by Jon Stevens <jo...@latchkey.com>.
on 9/9/01 12:26 AM, "geirm@apache.org" <ge...@apache.org> wrote:

> +
> +    /**
> +     *  Required init method for LogSystem
> +     *  to get access to RuntimeServices
> +     */ 
> +     public void init( RuntimeServices rs )
> +     {
> +         return;
> +     }

This commit has tabs in it.

Geir, in BBEdit, you can turn of tabs by doing this:

Edit->Preferences->Editor Defaults->Auto-Expand Tabs (make it checked)

-jon