Logger.post

Pack the given record using MessagePack and write it with the given timestamp using $(D_PSYMBOL write).

If a prefix was given when the logger was created the tag is appended to the prefix when posting. This allocation may be avoided by giving a $(D_KEYWORD null) prefix in the constructor and the full tag here.

  1. bool post(string tag, T record)
  2. bool post(string tag, SysTime time, T record)
    class Logger
    bool
    post
    (
    T
    )
    (
    in string tag
    ,
    in SysTime time
    ,
    auto ref const T record
    )

Parameters

tag string

string used to tag the record

time SysTime

timestamp of the event being logged

record T

data to be packed via msgpack and sent

Return Value

Type: bool

True if the data was successfully sent to the fluent server. False if the data was queued for sending later but no attempt was made to send to the remote host because of a previous error.

See Also

write

Meta