Package uk.ac.starlink.topcat

## Class LogConfig

- java.lang.Object
- - uk.ac.starlink.topcat.LogConfig

-     public class LogConfig
      extends java.lang.Object

  Utility methods for setting logging levels.
  Since:
    16 Jun 2005
  Author:
    Mark Taylor (Starlink)
  See Also:
    `java.util.logging`

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static java.lang.String` | `CONFIG_PROP` | Name of system property containing (`setConfiguration(java.lang.String)`-style) default logging configuration string.

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `LogConfig()` |

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static void` | `initFromProperty()` | Initializes logging from the value of the `CONFIG_PROP` property if it is defined.
    `static void` | `setConfiguration​(java.lang.String config)` | Sets the logging level(s) from a short string, the kind of thing you might get from a command-line switch.

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

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

- - ### Field Detail

    - #### CONFIG_PROP

          public static java.lang.String CONFIG_PROP

      Name of system property containing (`setConfiguration(java.lang.String)`-style) default logging configuration string.
      See Also:
        `initFromProperty()`

  - ### Constructor Detail

    - #### LogConfig

          public LogConfig()

  - ### Method Detail

    - #### setConfiguration

          public static void setConfiguration​(java.lang.String config)

      Sets the logging level(s) from a short string, the kind of thing you might get from a command-line switch.

      The format of the string is a comma-separated list of zero or more directives, each of the form

              [<handlername>=]<level>

      if <handlername> is omitted the root handler is assumed. The <level> can be either one of the `Level` names (case-insensitive) or an equivalent integer value.
      Parameters:
        `config` - configure string
      Throws:
        `java.lang.IllegalArgumentException` - if `config` is of the wrong form

    - #### initFromProperty

          public static void initFromProperty()

      Initializes logging from the value of the `CONFIG_PROP` property if it is defined. If it is not, and if neither of the standard `LogManager` control properties (`java.util.logging.config.class`, `java.util.logging.config.file`) are defined either, then the logging system is initialized so that only messages of `java.util.logging` properties are not defined either (these standard

Copyright © 2003-2018 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.