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

All Methods Static Methods Instance Methods Concrete Methods
`void` `addFrameworkPackage(List<String> frameworkPackages, String packageName)`
`void` `addGroovyPackages(List<String> frameworkPackages)`
`void` `addProperties(Properties props)`
`static Map<String,String>` `getFilenameCollisionMap(Context context)`
`static Map<String,FileNamePattern>` `getFilenamePatternCollisionMap(Context context)`
`static String` `getLocalHostName()`
`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 String getLocalHostName()
                                   throws UnknownHostException,
                                          SocketException

Throws:
  `UnknownHostException`
  `SocketException`

#### safelyGetLocalHostName

    public String safelyGetLocalHostName()

Add the local host's name as a property

#### addProperties

    public void addProperties(Properties props)

#### getFilenameCollisionMap

    public static Map<String,String> getFilenameCollisionMap(Context context)

#### getFilenamePatternCollisionMap

    public static Map<String,FileNamePattern> getFilenamePatternCollisionMap(Context context)

#### addGroovyPackages

    public void addGroovyPackages(List<String> frameworkPackages)

#### addFrameworkPackage

    public void addFrameworkPackage(List<String> frameworkPackages,
                                    String packageName)