Skip to content

Predefined formats

dmitrybond edited this page Jul 2, 2012 · 3 revisions

Seelog configuration parser recognizes a set of special format identifiers, known as predefined formats. These identifiers were introduced to avoid creating common formats like 'xml' or 'json' every time explicitly in a configuration file.

Usage

Use one of the predefined format identifiers in 'formatid' attribute of any output node. Predefined ids can be distinguished by a common prefix std:. The full list of ids is given in the Format reference section.

Note: It is absolutely legal to override predefined formats with your own and to create your own formats with identifiers starting with std:, but both practices are not recommended.

Example

Config

<seelog>
    <outputs formatid="std:json">
        <console/>
    </outputs>
</seelog>

Output

seelog.Info("Hello world!"):

{"time":1341218159882230900,"lev":"Inf","msg":"Hello world!"}

List of predefined formats

Format reference