| 91 | } |
| 92 | |
| 93 | void |
| 94 | LogConfig::read_configuration_variables() |
| 95 | { |
| 96 | int val; |
| 97 | char *ptr; |
| 98 | |
| 99 | val = static_cast<int>(REC_ConfigReadInteger("proxy.config.log.log_buffer_size")); |
| 100 | if (val > 0) { |
| 101 | log_buffer_size = val; |
| 102 | } |
| 103 | |
| 104 | val = static_cast<int>(REC_ConfigReadInteger("proxy.config.log.log_fast_buffer")); |
| 105 | if (val > 0) { |
| 106 | log_fast_buffer = true; |
| 107 | } |
| 108 | |
| 109 | val = static_cast<int>(REC_ConfigReadInteger("proxy.config.log.max_secs_per_buffer")); |
| 110 | if (val > 0) { |
| 111 | max_secs_per_buffer = val; |
| 112 | } |
| 113 | |
| 114 | val = static_cast<int>(REC_ConfigReadInteger("proxy.config.log.max_space_mb_for_logs")); |
| 115 | if (val > 0) { |
| 116 | max_space_mb_for_logs = val; |
| 117 | } |
| 118 | |
| 119 | val = static_cast<int>(REC_ConfigReadInteger("proxy.config.log.max_space_mb_headroom")); |
| 120 | if (val > 0) { |
| 121 | max_space_mb_headroom = val; |
| 122 | } |
| 123 | |
| 124 | val = static_cast<int>(REC_ConfigReadInteger("proxy.config.log.io.max_buffer_index")); |
| 125 | if (val > 0) { |
| 126 | logbuffer_max_iobuf_index = val; |
| 127 | } |
| 128 | |
| 129 | ptr = REC_ConfigReadString("proxy.config.log.logfile_perm"); |
| 130 | int logfile_perm_parsed = ink_fileperm_parse(ptr); |
| 131 | if (logfile_perm_parsed != -1) { |
| 132 | logfile_perm = logfile_perm_parsed; |
| 133 | } |
| 134 | ats_free(ptr); |
| 135 | |
| 136 | ptr = REC_ConfigReadString("proxy.config.log.hostname"); |
| 137 | if (ptr != nullptr) { |
| 138 | if (std::string_view(ptr) != "localhost") { |
| 139 | ats_free(hostname); |
| 140 | hostname = ptr; |
| 141 | } else { |
| 142 | ats_free(ptr); |
| 143 | } |
| 144 | } |
| 145 | |
| 146 | ptr = REC_ConfigReadString("proxy.config.error.logfile.filename"); |
| 147 | if (ptr != nullptr) { |
| 148 | ats_free(error_log_filename); |
| 149 | error_log_filename = ptr; |
| 150 | } |
no test coverage detected