diff options
author | Bernard Normier <bernard@zeroc.com> | 2007-02-01 17:09:49 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2007-02-01 17:09:49 +0000 |
commit | abada90e3f84dc703b8ddc9efcbed8a946fadead (patch) | |
tree | 2c6f9dccd510ea97cb927a7bd635422efaae547a /java/src/Ice/SysLoggerI.java | |
parent | removing trace message (diff) | |
download | ice-abada90e3f84dc703b8ddc9efcbed8a946fadead.tar.bz2 ice-abada90e3f84dc703b8ddc9efcbed8a946fadead.tar.xz ice-abada90e3f84dc703b8ddc9efcbed8a946fadead.zip |
Expanded tabs into spaces
Diffstat (limited to 'java/src/Ice/SysLoggerI.java')
-rw-r--r-- | java/src/Ice/SysLoggerI.java | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/java/src/Ice/SysLoggerI.java b/java/src/Ice/SysLoggerI.java index 14aa5ddaaf8..74e813f7ee2 100644 --- a/java/src/Ice/SysLoggerI.java +++ b/java/src/Ice/SysLoggerI.java @@ -19,77 +19,77 @@ public final class SysLoggerI extends LocalObjectImpl implements Logger public SysLoggerI(String ident) { - _ident = ident; - - // - // Open a datagram socket to communicate with the localhost - // syslog daemon. - // - try - { - _host = IceInternal.Network.getLocalAddress(); - _socket = new DatagramSocket(); - _socket.connect(_host, _port); - } - catch(java.io.IOException ex) - { + _ident = ident; + + // + // Open a datagram socket to communicate with the localhost + // syslog daemon. + // + try + { + _host = IceInternal.Network.getLocalAddress(); + _socket = new DatagramSocket(); + _socket.connect(_host, _port); + } + catch(java.io.IOException ex) + { Ice.SocketException se = new Ice.SocketException(); se.initCause(ex); throw se; - } + } } public void print(String message) { - log(LOG_INFO, message); + log(LOG_INFO, message); } public void trace(String category, String message) { - log(LOG_INFO, category + ": " + message); + log(LOG_INFO, category + ": " + message); } public void warning(String message) { - log(LOG_WARNING, message); + log(LOG_WARNING, message); } public void error(String message) { - log(LOG_ERR, message); + log(LOG_ERR, message); } private void log(int severity, String message) { - try - { - // - // Create a syslog message as defined by the RFC 3164: - // <PRI>HEADER MSG. PRI is the priority and is calculated - // from the facility and the severity. We don't specify - // the HEADER. MSG contains the identifier followed by a - // colon character and the message. - // - - int priority = (LOG_USER << 3) | severity; - - String msg = '<' + Integer.toString(priority) + '>' + _ident + ": " + message; - - byte buf[] = msg.getBytes(); - DatagramPacket p = new DatagramPacket(buf, buf.length, _host, _port); - _socket.send(p); - } - catch(java.io.IOException ex) - { + try + { + // + // Create a syslog message as defined by the RFC 3164: + // <PRI>HEADER MSG. PRI is the priority and is calculated + // from the facility and the severity. We don't specify + // the HEADER. MSG contains the identifier followed by a + // colon character and the message. + // + + int priority = (LOG_USER << 3) | severity; + + String msg = '<' + Integer.toString(priority) + '>' + _ident + ": " + message; + + byte buf[] = msg.getBytes(); + DatagramPacket p = new DatagramPacket(buf, buf.length, _host, _port); + _socket.send(p); + } + catch(java.io.IOException ex) + { Ice.SocketException se = new Ice.SocketException(); se.initCause(ex); throw se; - } + } } private String _ident; |