log4hs-0.9.0.0: A python logging style log library

Safe HaskellNone
LanguageHaskell2010

Logging.Config.Yaml

Description

This module provides a convenient way to decode a Manager from yaml string

Template

  sinks:
    root:
      handlers:
      - console
      - file
    App.Json:
      handlers:
      - file
      propagate: false
    App.Yaml:
      handlers:
      - rotate
      propagate: false

  handlers:
    console:
      type: StreamHandler
      level: DEBUG
      formatter: simple
      stream: stderr
    file:
      type: FileHandler
      level: "Level 100"
      formatter: standard
      file: /var/log/my/yaml.log
      encoding: utf8
    rotate:
      type: RotatingFileHandler
      level: INFO
      formatter: standard
      file: /var/log/my/yaml.log
      encoding: utf8
      maxBytes: 1048576
      backupCount: 10

  formatters:
    simple: "{message}"
    standard: "{asctime:%Y-%m-%dT%H:%M:%S%6Q%z} - {level} - {logger}] {message}"

  disabled: false
Synopsis

Documentation

getManager :: ByteString -> IO Manager Source #

decode a Manager from strict ByteString, it 1) decodes ConfigH from json string, 2) constructs an Manager

Since: 0.4.0

getManagerFile :: FilePath -> IO Manager Source #

decode a Manager from a file, it 1) reads json string from file, 2) calls getManager to construct an Manager

Since: 0.4.0