[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
verbose messages
From: |
Marcus G. Daniels |
Subject: |
verbose messages |
Date: |
20 Mar 2001 17:53:24 -0800 |
User-agent: |
Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.4 |
Here's a handy new little feature for command-line control of messages.
I find I often accumulate quite a bit of non-trivial diagnostic code in
a model, but only rarely do I really want to look at it during a run.
With the `-v' command line option and the verboseMessage method, you
can control what is printed without touching the source code of your
model. For example, with the program below (and today's DLLs and .jar
file), you can see how the `-v' option controls output. (Just replace
System.out.println with Globals.env.verboseMessage.)
ftp://ftp.swarm.org/pub/swarm/binaries/w32/latest
ftp://ftp.swarm.org/pub/swarm/src/testing/swarm-2001-03-20.tar.gz
$ javaswarm TestVerbose
$ javaswarm TestVerbose -v
woof woof!
$ cat TestVerbose.java
import swarm.Globals;
public class TestVerbose {
static void main (String args[]) {
Globals.env.initSwarm ("TestVerbose", "0.0", "address@hidden", args);
Globals.env.verboseMessage ("woof woof!");
}
}
==================================
Swarm-Support is for discussion of the technical details of the day
to day usage of Swarm. For list administration needs (esp.
[un]subscribing), please send a message to <address@hidden>
with "help" in the body of the message.
- verbose messages,
Marcus G. Daniels <=