Top Fields Constructors Methods
ch.qos.logback.classic.pattern

public Class SyslogStartConverter

extends ClassicConverter
Class Inheritance
Imports
java.net.InetAddress, .UnknownHostException, java.text.SimpleDateFormat, java.util.Calendar, .Date, .Locale, ch.qos.logback.classic.spi.ILoggingEvent, ch.qos.logback.classic.util.LevelToSyslogSeverity, ch.qos.logback.core.net.SyslogAppenderBase

Field Summary

Modifier and TypeField and Description
private final Calendar
pack-priv int
pack-priv long
pack-priv String
pack-priv SimpleDateFormat
pack-priv SimpleDateFormat
pack-priv String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv String
public String
convert(ILoggingEvent event)

Implements abstract ch.qos.logback.core.pattern.Converter.convert.

The convert method is responsible for extracting data from the event and storing it for later use by the write method.
public String

Returns:

String the name of the local host
getLocalHostname
()

This method gets the network name of the machine we are running on.

public void
start()

Overrides ch.qos.logback.core.pattern.DynamicConverter.start.

Implements ch.qos.logback.core.spi.LifeCycle.start.

Components that depend on options passed during configuration can override this method in order to make appropriate use of those options.

Field Detail

calendarback to summary
private final Calendar calendar
facilityback to summary
pack-priv int facility
lastTimestampback to summary
pack-priv long lastTimestamp
localHostNameback to summary
pack-priv String localHostName
simpleMonthFormatback to summary
pack-priv SimpleDateFormat simpleMonthFormat
simpleTimeFormatback to summary
pack-priv SimpleDateFormat simpleTimeFormat
timesmapStrback to summary
pack-priv String timesmapStr

Constructor Detail

SyslogStartConverterback to summary
public SyslogStartConverter()

Method Detail

computeTimeStampStringback to summary
pack-priv String computeTimeStampString(long now)
convertback to summary
public String convert(ILoggingEvent event)

Implements abstract ch.qos.logback.core.pattern.Converter.convert.

Doc from ch.qos.logback.core.pattern.Converter.convert.

The convert method is responsible for extracting data from the event and storing it for later use by the write method.

getLocalHostnameback to summary
public String getLocalHostname()

This method gets the network name of the machine we are running on. Returns "UNKNOWN_LOCALHOST" in the unlikely case where the host name cannot be found.

Returns:String

String the name of the local host

startback to summary
public void start()

Overrides ch.qos.logback.core.pattern.DynamicConverter.start.

Implements ch.qos.logback.core.spi.LifeCycle.start.

Doc from ch.qos.logback.core.pattern.DynamicConverter.start.

Components that depend on options passed during configuration can override this method in order to make appropriate use of those options. For simpler components, the trivial implementation found in this abstract class will be sufficient.