github.com/qioalice/ekago/v3@v3.3.2-0.20221202205325-5c262d586ee4/ekalog/entry.go (about) 1 // Copyright © 2020-2021. All rights reserved. 2 // Author: Ilya Stroy. 3 // Contacts: iyuryevich@pm.me, https://github.com/qioalice 4 // License: https://opensource.org/licenses/MIT 5 6 package ekalog 7 8 import ( 9 "time" 10 11 "github.com/qioalice/ekago/v3/internal/ekaletter" 12 ) 13 14 type ( 15 // Entry is a Logger's object that contains all data about one log event. 16 // 17 // Entry contains time, message, fields, attached error (if any), level 18 // and a Logger using which this Entry must be logged. 19 // 20 // You MUST NOT instantiate this object manually. 21 // It's exposed only for custom encoders. 22 Entry struct { 23 l *Logger // The logger this entry created by or belongs to. 24 25 // LogLetter contains message, fields, stacktrace of Entry. 26 // Public because of providing access from the user's Integrator. 27 LogLetter *ekaletter.Letter 28 29 // ErrLetter is attached error's letter. Contains its stacktrace, message, fields. 30 // Public because of providing access from the user's Integrator. 31 ErrLetter *ekaletter.Letter 32 33 // Level indicates how important occurred event (this log entry represents) is. 34 Level Level 35 36 // Time contains the time when an event occurred this log entry represents. 37 // Generated automatically by time.Now() call in log finisher. 38 Time time.Time 39 40 needSetFinalizer bool 41 } 42 )