public class Syslog
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
Syslog.Clib
Define the libc methods we want and create a static instance of these methods mapped to the
native libc.so library.
|
| Constructor and Description |
|---|
Syslog() |
| Modifier and Type | Method and Description |
|---|---|
static void |
debug(java.lang.String... args)
Log a message at LOG_DEBUG level.
|
static void |
info(java.lang.String... args)
Log a message at LOG_INFO level.
|
static void |
main(java.lang.String[] args)
Print the message "hello world!" with ident "test_syslog" to the LOG_USER facility and also
print the message to stderr.
|
static void |
openlog(java.lang.String ident,
Facility facility,
Option... logopts)
Setup more specialized processing of the messages sent by syslog().
|
public static void openlog(java.lang.String ident,
Facility facility,
Option... logopts)
ident - This will be prepended to every message.facility - Default facility for messages that do specify one.logopts - Specifies logging options.public static void debug(java.lang.String... args)
public static void info(java.lang.String... args)
Takes a printf style list of strings; for example, Syslog.debug("%s is the %s", "42", "answer");
Note that the %s is the only formatting anchor that makes sense, as all arguments are strings.
public static void main(java.lang.String[] args)
args - Ignored