Edgewall Software
Modify

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#9918 closed enhancement (fixed)

Unused code: trac.log.logger_factory()

Reported by: Carsten Klein <carsten.klein@…> Owned by: Remy Blank
Priority: lowest Milestone: 0.12.2
Component: general Version: 0.13dev
Severity: trivial Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Christian Boos)

The function is currently unused. Is there any reason for keeping it in there?

Attachments (0)

Change History (5)

comment:1 by Christian Boos, 14 years ago

Description: modified (diff)

Unused? Not really:

trac/log.py:0068: def logger_factory(logtype='syslog', logfile=None, level='WARNING',
trac/admin/tests/console.py:0080:         from trac.log import logger_factory
trac/admin/tests/console.py:0081:         self.log = logger_factory('null')
trac/versioncontrol/tests/svn_fs.py:0033: from trac.log import logger_factory

comment:2 by Christian Boos, 14 years ago

Ok, the last match is an unused import, worth removing.

in reply to:  2 comment:3 by Carsten Klein <carsten.klein@…>, 14 years ago

Replying to cboos:

Ok, the last match is an unused import, worth removing.

:D - in effect the previous matches are also worth rethinking if the logger_factory still needs to be in the code, since it is only used by tests.

but this is more or less philosophical…

comment:4 by Remy Blank, 14 years ago

Resolution: fixed
Status: newclosed

Unused import removed in [10399]. As for the purpose of logger_factory(), I assume it's for backward compatibility. We could eventually remove it and replace the remaining call with a call to logger_handler_factory().

comment:5 by Remy Blank, 14 years ago

Milestone: 0.12.2
Owner: set to Remy Blank

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Remy Blank.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Remy Blank to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.