-
Notifications
You must be signed in to change notification settings - Fork 2
Remove deprecated Logger #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
See https://docs.python.org/2/library/logging.config.html [handler_hand05]
class=handlers.SysLogHandler
level=ERROR
formatter=form05
args=(('localhost', handlers.SYSLOG_UDP_PORT), handlers.SysLogHandler.LOG_USER) |
I think thy python ini file layout is a much better approach, |
Idea for a really short syntax [default]
appenders[]=util.log.ConsoleAppender("err")
appenders[]=ALL:util.log.FileAppender("/var/log/server.log")
appenders[]=WARN,ERROR:util.log.SyslogUdpAppender("127.0.0.1", 514, "server") |
Your approach is also a good alternative since it is very compact but not that easy to read. |
Mapping the Python exampleIni file[default]
uses=console|syslog|files
[console]
class=util.log.ConsoleAppender
level=ALL
[files]
class=util.log.FileAppender
args="/var/log/server.log"
level=ALL
[syslog]
class=util.log.SyslogUdpAppender
args=127.0.0.1|514|server
level=WARN|ERROR API$c= new LogConfiguration(new Properties('log.ini'));
$cat= $c->category('default'); // Returns console, syslog and files
$cat= $c->category('syslog'); // An appender as configured by "syslog"
$all= $c->categories(); // ["default" => new LogCategory()->withAppenders(...), "syslog" => ...
$name= 'does-not-exist';
$exists= $c->provides($name); // FALSE
$cat= $c->category($name); // ***lang.IllegalArgumentException*** |
👍 |
thekid
added a commit
that referenced
this issue
Aug 24, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
util.log.Logger
class has been deprecated since 8.0.0; and is scheduled for removal in 9.0.0Should there be a replacement for its
configure()
method? Should we adapt INI file layout at the same time?The text was updated successfully, but these errors were encountered: