Module tikv_util::logger::formatter[][src]

Functions

need_json_encode

According to RFC: Unified Log Format, it returns true when this byte stream contains the following characters, which means this input stream needs to be JSON encoded. Otherwise, it returns false.

write_escaped_str

According to RFC: Unified Log Format, escapes the given data and writes it into a writer. If there is no character need json encode, it writes the data into the writer directly. Else, it serializes the given data structure as JSON into a writer.

write_file_name

Writes file name into the writer, removes the character which not match [a-zA-Z0-9\.-_]