Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decode_log_msg ¶
Do not call this method on a running server as it may crash the server Even if you call it on your own log file, if your log file was partly written it can still crash your program But the Rotate function isn't affected because it only looks for newlines. Since we don't write any newlines except at the end of every log message, it's fine.
func Encode_log_msg ¶
func Get_first_line_from_file ¶
This function returns the first line in the file It will return an error if the file is empty or contains no newlines Make sure every read is preceded by a seek.
func Get_last_nonempty_line_from_file ¶
This function returns the last non-empty line in the file It will return an error if there's only one line in the file, or if the file is empty, or if the file only contains newlines Make sure every read is preceded by a seek.
Types ¶
This section is empty.