metaglue
Class BroadcastingLogStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--java.io.FilterOutputStream
              |
              +--java.io.PrintStream
                    |
                    +--metaglue.LogStream
                          |
                          +--metaglue.BroadcastingLogStream

public class BroadcastingLogStream
extends LogStream

Overview This class is a simple extension of LogStream with identical functionality with the exception that it additionally broadcasts (notifies) the log information to the local LocalLogManager, which in turn handles the system-wide propagation of that message


Field Summary
static LocalLogManager llm
           
 
Fields inherited from class metaglue.LogStream
CRITICAL, DEBUG, ERROR, FAST_LOGGING, INFO, WARNING
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
BroadcastingLogStream(LocalLogManager LLM, OutputStream out)
           
BroadcastingLogStream(LocalLogManager LLM, OutputStream out, boolean autoFlush, int lvl)
           
 
Method Summary
static void printerr(int logLevel, String who, String s)
          This creates a new agentID with the "who" as the occupation.
 void println(int level, AgentID id, String s)
          This is the standard call.
 void println(int level, String s)
          This attaches the label "unknown" to the message.
 
Methods inherited from class metaglue.LogStream
getLogLevel, getLogLevel, levelIndicator, log, log, setLogLevel, setLogLevel, setStaticLogLevel
 
Methods inherited from class java.io.PrintStream
checkError, close, flush, print, print, print, print, print, print, print, print, print, println, println, println, println, println, println, println, println, println, println, setError, write, write
 
Methods inherited from class java.io.FilterOutputStream
write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

llm

public static LocalLogManager llm
Constructor Detail

BroadcastingLogStream

public BroadcastingLogStream(LocalLogManager LLM,
                             OutputStream out)

BroadcastingLogStream

public BroadcastingLogStream(LocalLogManager LLM,
                             OutputStream out,
                             boolean autoFlush,
                             int lvl)
Method Detail

println

public void println(int level,
                    String s)
This attaches the label "unknown" to the message. Should be updated in the future...maybe to simply refer to the local system
Overrides:
println in class LogStream

println

public void println(int level,
                    AgentID id,
                    String s)
This is the standard call. Most of the messages should go via this route
Overrides:
println in class LogStream

printerr

public static void printerr(int logLevel,
                            String who,
                            String s)
This creates a new agentID with the "who" as the occupation. Again, this should be revised later.