ch.qos.logback.core.util

## Class ContextUtil

- java.lang.Object
- - ch.qos.logback.core.spi.ContextAwareBase
  - - ch.qos.logback.core.util.ContextUtil

All Implemented Interfaces:
  ContextAware

    public class ContextUtil
    extends ContextAwareBase

### Field Summary

### Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase

`context`

### Constructor Summary

Constructors
Constructor and Description
`ContextUtil(Context context)`

### Method Summary

Methods
`void` `addFrameworkPackage(java.util.List<java.lang.String> frameworkPackages, java.lang.String packageName)`
`void` `addGroovyPackages(java.util.List<java.lang.String> frameworkPackages)`
`void` `addHostNameAsProperty()` Add the local host's name as a property
`void` `addProperties(java.util.Properties props)`
`static java.lang.String` `getLocalHostName()`

### Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase

`addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext`

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

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

### Constructor Detail

#### ContextUtil

    public ContextUtil(Context context)

### Method Detail

#### getLocalHostName

    public static java.lang.String getLocalHostName()
                                             throws java.net.UnknownHostException,
                                                    java.net.SocketException

Throws:
  `java.net.UnknownHostException`
  `java.net.SocketException`

#### addHostNameAsProperty

    public void addHostNameAsProperty()

Add the local host's name as a property

#### addProperties

    public void addProperties(java.util.Properties props)

#### addGroovyPackages

    public void addGroovyPackages(java.util.List<java.lang.String> frameworkPackages)

#### addFrameworkPackage

    public void addFrameworkPackage(java.util.List<java.lang.String> frameworkPackages,
                           java.lang.String packageName)