org.silvermoon.moonglow.util
Class Util

java.lang.Object
  |
  +--org.silvermoon.moonglow.util.Util

public class Util
extends java.lang.Object


Field Summary
static java.lang.String USERAGENT_MOZILLA
           
 
Constructor Summary
Util()
           
 
Method Summary
static java.lang.String doHttpGet(java.lang.String urlStr, java.lang.String userAgent)
           
static java.lang.String execGetOutput(java.lang.String arg)
          Executes a system process and captures its output
static org.apache.log.Logger getFileLogger(java.lang.String logName, boolean append)
          Get a file logger
static void logError(java.lang.String msg, java.lang.Throwable t)
          Log error to the general log
static void logFatalError(java.lang.String msg, java.lang.Throwable t)
          Log a fatal error to the general log
static void logInfo(java.lang.String msg)
          Log info to the general log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USERAGENT_MOZILLA

public static final java.lang.String USERAGENT_MOZILLA
See Also:
Constant Field Values
Constructor Detail

Util

public Util()
Method Detail

getFileLogger

public static org.apache.log.Logger getFileLogger(java.lang.String logName,
                                                  boolean append)
                                           throws java.io.IOException
Get a file logger

Parameters:
logName - the name of the log
java.io.IOException

logInfo

public static void logInfo(java.lang.String msg)
Log info to the general log


logError

public static void logError(java.lang.String msg,
                            java.lang.Throwable t)
Log error to the general log


logFatalError

public static void logFatalError(java.lang.String msg,
                                 java.lang.Throwable t)
Log a fatal error to the general log


doHttpGet

public static java.lang.String doHttpGet(java.lang.String urlStr,
                                         java.lang.String userAgent)
                                  throws java.io.IOException,
                                         java.net.MalformedURLException
java.io.IOException
java.net.MalformedURLException

execGetOutput

public static java.lang.String execGetOutput(java.lang.String arg)
                                      throws java.io.IOException
Executes a system process and captures its output

java.io.IOException