All pastes #427948 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-04-07 03:41 UTC
rendered paste body
    # Array mapping from all unique prefixes for log levels to their
    # corresponding long form.

    # *future* Use a procedure from 'textutil' to calculate the
    #          prefixes and to fill the map.

    variable  levelMap
    array set levelMap {
    a       alert
    al      alert
    ale     alert
    aler        alert
    alert       alert
    c       critical
    cr      critical
    cri     critical
    crit        critical
    criti       critical
    critic      critical
    critica     critical
    critical    critical
    d       debug
    de      debug
    deb     debug
    debu        debug
    debug       debug
    em      emergency
    eme     emergency
    emer        emergency
    emerg       emergency
    emerge      emergency
    emergen     emergency
    emergenc    emergency
    emergency   emergency
    er      error
    err     error
    erro        error
    error       error
    i       info
    in      info
    inf     info
    info        info
    n       notice
    no      notice
    not     notice
    noti        notice
    notic       notice
    notice      notice
    w       warning
    wa      warning
    war     warning
    warn        warning
    warni       warning
    warnin      warning
    warning     warning
    }