Package com.pixelmed.utils

# Class Syslog

java.lang.Object
com.pixelmed.utils.Syslog

public class Syslog extends Object

A class to private remote logging via the BSD syslog service (UDP on port 514).

To get a syslogd to listen to port 514 packets, one needs to start it with a specific option, e.g. "-r" on Linux or Solaris, or "-u" on MacOSX prior to Panther, or without the "-s" after Panther. On Linux one edits the options in "/etc/sysconfig/syslog" and does an "/etc/rc.d/init.d/syslog restart".

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`ALERT`
`static final int`
`AUTH`
`static final int`
`CRIT`
`static final int`
`CRON`
`static final int`
`DAEMON`
`static final int`
`DEBUG`
`static final int`
`EMERG`
`static final int`
`ERR`
`static final int`
`INFO`
`static final int`
`KERN`
`static final int`
`LOCAL0`
`static final int`
`LOCAL1`
`static final int`
`LOCAL2`
`static final int`
`LOCAL3`
`static final int`
`LOCAL4`
`static final int`
`LOCAL5`
`static final int`
`LOCAL6`
`static final int`
`LOCAL7`
`static final int`
`LPR`
`static final int`
`MAIL`
`static final int`
`NEWS`
`static final int`
`NOTICE`
`static final int`
`SYSLOG`
`static final int`
`USER`
`static final int`
`UUCP`
`static final int`
`WARNING`

## Constructor Summary

Constructors
Constructor
Description
`Syslog(String host)`

## Method Summary

Modifier and Type
Method
Description
`int`
`getFacilityByName(String s)`
`int`
`getPriorityByName(String s)`
`static void`
`main(String[] arg)`
Testing.
`final void`
`send(int facility, int priority, String message)`

### Methods inherited from class java.lang.Object

`clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### KERN

public static final int KERN

See Also:
  - Constant Field Values

### USER

public static final int USER

See Also:
  - Constant Field Values

### MAIL

public static final int MAIL

See Also:
  - Constant Field Values

### DAEMON

public static final int DAEMON

See Also:
  - Constant Field Values

### AUTH

public static final int AUTH

See Also:
  - Constant Field Values

### SYSLOG

public static final int SYSLOG

See Also:
  - Constant Field Values

### LPR

public static final int LPR

See Also:
  - Constant Field Values

### NEWS

public static final int NEWS

See Also:
  - Constant Field Values

### UUCP

public static final int UUCP

See Also:
  - Constant Field Values

### CRON

public static final int CRON

See Also:
  - Constant Field Values

### LOCAL0

public static final int LOCAL0

See Also:
  - Constant Field Values

### LOCAL1

public static final int LOCAL1

See Also:
  - Constant Field Values

### LOCAL2

public static final int LOCAL2

See Also:
  - Constant Field Values

### LOCAL3

public static final int LOCAL3

See Also:
  - Constant Field Values

### LOCAL4

public static final int LOCAL4

See Also:
  - Constant Field Values

### LOCAL5

public static final int LOCAL5

See Also:
  - Constant Field Values

### LOCAL6

public static final int LOCAL6

See Also:
  - Constant Field Values

### LOCAL7

public static final int LOCAL7

See Also:
  - Constant Field Values

### EMERG

public static final int EMERG

See Also:
  - Constant Field Values

### ALERT

public static final int ALERT

See Also:
  - Constant Field Values

### CRIT

public static final int CRIT

See Also:
  - Constant Field Values

### ERR

public static final int ERR

See Also:
  - Constant Field Values

### WARNING

public static final int WARNING

See Also:
  - Constant Field Values

### NOTICE

public static final int NOTICE

See Also:
  - Constant Field Values

### INFO

public static final int INFO

See Also:
  - Constant Field Values

### DEBUG

public static final int DEBUG

See Also:
  - Constant Field Values

## Constructor Details

### Syslog

public Syslog(String host) throws UnknownHostException, SocketException

Throws:
  `UnknownHostException`
  `SocketException`

## Method Details

### getFacilityByName

public int getFacilityByName(String s)

### getPriorityByName

public int getPriorityByName(String s)

### send

public final void send(int facility, int priority, String message) throws IOException, UnknownHostException, SocketException

Throws:
  `IOException`
  `UnknownHostException`
  `SocketException`

### main

public static void main(String[] arg)

Testing.

Parameters:
  `arg` - ignored