edu.mscd.cs.javaln.syslog
Class CLIFormatter

java.lang.Object
  extended by java.util.logging.Formatter
      extended by edu.mscd.cs.javaln.syslog.SyslogFormatter
          extended by edu.mscd.cs.javaln.syslog.CLIFormatter

public class CLIFormatter
extends SyslogFormatter

Format a message so that it is acceptable to the UNIX command line interface "logger" command.


Field Summary
 
Fields inherited from class edu.mscd.cs.javaln.syslog.SyslogFormatter
Auth, Authpriv, Cron, Daemon, facility, FTP, Kern, Local0, Local1, Local2, Local3, Local4, Local5, Local6, Local7, LPR, Mail, News, Syslog, User, UUCP
 
Constructor Summary
CLIFormatter()
           
CLIFormatter(int facility)
           
 
Method Summary
 java.lang.String getPrefix(int level)
          A simple formatting routine that returns "-p ", the facility defined in the base class, and the level passed in.
static void main(java.lang.String[] args)
          Unit tests
 
Methods inherited from class edu.mscd.cs.javaln.syslog.SyslogFormatter
format, mapFacility, mapLevel
 
Methods inherited from class java.util.logging.Formatter
formatMessage, getHead, getTail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CLIFormatter

public CLIFormatter()

CLIFormatter

public CLIFormatter(int facility)
Method Detail

getPrefix

public java.lang.String getPrefix(int level)
A simple formatting routine that returns "-p ", the facility defined in the base class, and the level passed in.

Specified by:
getPrefix in class SyslogFormatter
Parameters:
level - the numerical level of the message
Returns:
a string formatted for the "logger" command

main

public static void main(java.lang.String[] args)
Unit tests