mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 06:00:54 +00:00
Add enableFullFilePath field to BeeLogger
This commit is contained in:
parent
6c002a3124
commit
fe56de06b5
@ -115,6 +115,7 @@ type BeeLogger struct {
|
|||||||
init bool
|
init bool
|
||||||
enableFuncCallDepth bool
|
enableFuncCallDepth bool
|
||||||
loggerFuncCallDepth int
|
loggerFuncCallDepth int
|
||||||
|
enableFullFilePath bool
|
||||||
asynchronous bool
|
asynchronous bool
|
||||||
prefix string
|
prefix string
|
||||||
msgChanLen int64
|
msgChanLen int64
|
||||||
@ -654,6 +655,12 @@ func GetLogger(prefixes ...string) *log.Logger {
|
|||||||
return l
|
return l
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// EnableFullFilePath enables full file path logging. Disabled by default
|
||||||
|
// e.g "/home/Documents/GitHub/beego/mainapp/" instead of "mainapp"
|
||||||
|
func EnableFullFilePath(b bool) {
|
||||||
|
beeLogger.enableFullFilePath = b
|
||||||
|
}
|
||||||
|
|
||||||
// Reset will remove all the adapter
|
// Reset will remove all the adapter
|
||||||
func Reset() {
|
func Reset() {
|
||||||
beeLogger.Reset()
|
beeLogger.Reset()
|
||||||
|
Loading…
Reference in New Issue
Block a user