Skip to content

Commit 7d98726

Browse files
committed
[core] Support time units in option --log-file-rotate-interval
1 parent 1a19764 commit 7d98726

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main-options.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ void MainOptions::parse(const std::list<std::string> &args) {
202202
} else if (k == "--log-file-max-count") {
203203
log_file_max_count = std::atoi(v.c_str());
204204
} else if (k == "--log-file-rotate-interval") {
205-
log_file_rotate_interval = std::atof(v.c_str());
205+
log_file_rotate_interval = utils::get_seconds(v);
206206
} else if (k == "--log-level") {
207207
if (
208208
utils::starts_with(v, "debug") && (

0 commit comments

Comments
 (0)