Package 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
`ContextUtil​(Context context)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`void` `addFrameworkPackage​(java.util.List<java.lang.String> frameworkPackages, java.lang.String packageName)`
`void` `addGroovyPackages​(java.util.List<java.lang.String> frameworkPackages)`
`void` `addProperties​(java.util.Properties props)`
`static java.util.Map<java.lang.String,​java.lang.String>` `getFilenameCollisionMap​(Context context)`
`static java.util.Map<java.lang.String,​FileNamePattern>` `getFilenamePatternCollisionMap​(Context context)`
`static java.lang.String` `getLocalHostName()`
`java.lang.String` `safelyGetLocalHostName()` Add the local host's name as a property

### 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`

#### safelyGetLocalHostName

    public java.lang.String safelyGetLocalHostName()

Add the local host's name as a property

#### addProperties

    public void addProperties​(java.util.Properties props)

#### getFilenameCollisionMap

    public static java.util.Map<java.lang.String,​java.lang.String> getFilenameCollisionMap​(Context context)

#### getFilenamePatternCollisionMap

    public static java.util.Map<java.lang.String,​FileNamePattern> getFilenamePatternCollisionMap​(Context context)

#### 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)