mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-19 17:24:26 +08:00
support logging request logs and database query logs to separate files, and support rotating log files
This commit is contained in:
@@ -15,6 +15,7 @@ const (
|
||||
SystemSubcategorySetting = 1
|
||||
SystemSubcategoryDatabase = 2
|
||||
SystemSubcategoryMail = 3
|
||||
SystemSubcategoryLogging = 4
|
||||
)
|
||||
|
||||
// Sub categories of normal error
|
||||
@@ -75,6 +76,15 @@ func NewNormalError(subCategory int32, index int32, httpStatusCode int, message
|
||||
return New(CATEGORY_NORMAL, subCategory, index, httpStatusCode, message)
|
||||
}
|
||||
|
||||
// NewLoggingError returns a new logging error instance
|
||||
func NewLoggingError(message string, err ...error) *Error {
|
||||
return New(ErrLoggingError.Category,
|
||||
ErrLoggingError.SubCategory,
|
||||
ErrLoggingError.Index,
|
||||
ErrLoggingError.HttpStatusCode,
|
||||
message, err...)
|
||||
}
|
||||
|
||||
// NewIncompleteOrIncorrectSubmissionError returns a new incomplete or incorrect submission error instance
|
||||
func NewIncompleteOrIncorrectSubmissionError(err error) *Error {
|
||||
return New(ErrIncompleteOrIncorrectSubmission.Category,
|
||||
|
||||
Reference in New Issue
Block a user