You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I create this library I think about it as a low level
library. And to build complex loggers just need one more
level which will build loggers based on configuration files
like this.
locallog=Logger[category]
log.error('message')
-- or even use `log` to build/find new loggerslocaldb_log=log.database
Where Logger will build new loggers by some config.
-- Config at first have to define all writers.-- It is important because some writers create-- worker threads to do IO in backgroundwriters= {
file1= { type='file' ... },
file2= { type='file' ... }.
server1= {type='net.udp'},
email= {type='smtp'},
}
-- Then define loggers based on existed writers.loggers= {
category1= {
writers= {
{writers.file1, writers.server1},
alert=writers.email,
}
-- may be other settings
},
category1= {
writers= {
{writers.file2, writers.server1},
alert=writers.email,
}
},
}
Activity
moteus commentedon Feb 26, 2018
I do not think I like this idea.
When I create this library I think about it as a low level
library. And to build complex loggers just need one more
level which will build loggers based on configuration files
like this.
Where
Loggerwill build new loggers by some config.d9k commentedon Feb 27, 2018
thx, @moteus, I was intending to overcome the lack of categories exactly the same way you're suggesting!