Skip to content

Conversation

@caijieming-ng
Copy link
Collaborator

No description provided.

@baidubot
Copy link
Collaborator

Reviewers: @bluebore @taocp @xupeilin

}
} // evict oldest log
} // new log open suc
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mutex should be released here.

va_copy(backup_ap, ap);
pl += vsnprintf(pl, limit - pl, format, backup_ap);
va_end(backup_ap);
cur_log_size_ += (pl >= limit) ? 30000: (pl - logbuf_);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is better to get cur_log_size through the return value of PosixLogger::Logv to reduce duplicate calculation and memory copy.

log_count_(log_count),
cur_log_size_(0),
logger_(NULL),
logbuf_(new char[30000]) {}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

log_list_ should be initialized by list the directory.

@taocp
Copy link
Collaborator

taocp commented Nov 28, 2016

First of all, 'issue #1038' is not an issue but a PR;
Then, could you please describe (in English/Chinese) what do you want to do 😂

Why & What in human language first and then the code

@bluebore
Copy link
Collaborator

kan bu donga

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants