Added functions to access members
Functions to access all members of baseElektronLogger.config
This commit is contained in:
parent
da6577fc68
commit
02abb1e882
7 changed files with 26 additions and 16 deletions
|
@ -46,7 +46,7 @@ func newSchedWindowLogger(
|
|||
func (sLog schedWindowLogger) Log(logType int, level log.Level, message string) {
|
||||
if sLog.logType == logType {
|
||||
if sLog.isEnabled() {
|
||||
if sLog.config.AllowOnConsole {
|
||||
if sLog.isAllowedOnConsole() {
|
||||
sLog.logger.SetOutput(os.Stdout)
|
||||
sLog.logger.WithFields(sLog.data).Log(level, message)
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ func (sLog schedWindowLogger) Log(logType int, level log.Level, message string)
|
|||
func (sLog schedWindowLogger) Logf(logType int, level log.Level, msgFmtString string, args ...interface{}) {
|
||||
if sLog.logType == logType {
|
||||
if sLog.isEnabled() {
|
||||
if sLog.config.AllowOnConsole {
|
||||
if sLog.isAllowedOnConsole() {
|
||||
sLog.logger.SetOutput(os.Stdout)
|
||||
sLog.logger.WithFields(sLog.data).Logf(level, msgFmtString, args...)
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ func (sLog schedWindowLogger) Logf(logType int, level log.Level, msgFmtString st
|
|||
|
||||
func (sLog *schedWindowLogger) createLogFile(prefix string) {
|
||||
if sLog.isEnabled() {
|
||||
filename := strings.Join([]string{prefix, sLog.config.FilenameExtension}, "")
|
||||
filename := strings.Join([]string{prefix, sLog.getFilenameExtension()}, "")
|
||||
dirName := sLog.logDir.getDirName()
|
||||
if dirName != "" {
|
||||
if logFile, err := os.Create(filepath.Join(dirName, filename)); err != nil {
|
||||
|
|
Reference in a new issue