| 991 | // We keep the data in a separate struct so that each instance of |
| 992 | // LogMessage uses less stack space. |
| 993 | struct LogMessageData { |
| 994 | LogMessageData() {}; |
| 995 | |
| 996 | int preserved_errno_; // errno at Init() time |
| 997 | scoped_array<char> buf_; // buffer space for non FATAL messages |
| 998 | char* message_text_; // Complete message text |
| 999 | scoped_ptr<LogStream> stream_alloc_; |
| 1000 | LogStream* stream_; |
| 1001 | char severity_; // level of LogMessage (ex. I, W, E, F) |
| 1002 | int line_; // line number of file that called LOG |
| 1003 | void (LogMessage::*send_method_)(); // Call this in destructor to send |
| 1004 | union { // At most one of these is used: union to keep the size low. |
| 1005 | LogSink* sink_; // NULL or sink to send message to |
| 1006 | vector<string>* outvec_; // NULL or vector to push message onto |
| 1007 | string* message_; // NULL or string to write message into |
| 1008 | }; |
| 1009 | time_t timestamp_; // Time of creation of LogMessage |
| 1010 | struct tm tm_time_; // Time of creation of LogMessage |
| 1011 | size_t num_prefix_chars_; // # of chars of prefix in this message |
| 1012 | size_t num_chars_to_log_; // # of chars of msg to send to log |
| 1013 | size_t num_chars_to_syslog_; // # of chars of msg to send to syslog |
| 1014 | const char* basename_; // basename of file that called LOG |
| 1015 | const char* fullname_; // fullname of file that called LOG |
| 1016 | bool has_been_flushed_; // false => data has not been flushed |
| 1017 | bool first_fatal_; // true => this was first fatal msg |
| 1018 | |
| 1019 | private: |
| 1020 | DISALLOW_EVIL_CONSTRUCTORS(LogMessageData); |
| 1021 | }; |
| 1022 | |
| 1023 | static LogMessageData fatal_msg_data_exclusive_; |
| 1024 | static LogMessageData fatal_msg_data_shared_; |
nothing calls this directly
no outgoing calls
no test coverage detected