Skip to content

Commit

Permalink
Fea: add log_error config for control show error message
Browse files Browse the repository at this point in the history
  • Loading branch information
welefen committed Mar 1, 2016
1 parent a4e84ec commit adf70fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ let config = {

log_pid: false,
log_request: false,

log_error: true,

create_server: undefined,
output_content: undefined,
Expand Down
3 changes: 2 additions & 1 deletion src/core/think.js
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,8 @@ think.statusAction = async (status, http, log) => {
}
http._error = true;

if(log){
//@TODO move log error to error controller
if(log && think.config('log_error') !== false){
think.log(http.error);
}

Expand Down

0 comments on commit adf70fd

Please sign in to comment.