Closed Bug 1050408 Opened 11 years ago Closed 11 years ago

devicemanager calls "warn" on a structured logger

Categories

(Testing :: Mozbase, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla34

People

(Reporter: chmanchester, Assigned: jgraham)

Details

Attachments

(1 file)

Devicemanager uses "warn" for logging in a few places: testing/mozbase/mozdevice/mozdevice/devicemanager.py:88: self._logger.warn("dm.debug is deprecated. Use logLevel.") testing/mozbase/mozdevice/mozdevice/devicemanager.py:95: self._logger.warn("dm.debug is deprecated. Use logLevel.") testing/mozbase/mozdevice/mozdevice/devicemanagerSUT.py:483: self._logger.warn("process %s appears to be running already\n" % appname) testing/mozbase/mozdevice/mozdevice/devicemanagerSUT.py:517: self._logger.warn("launchProcess called without command to run") testing/mozbase/mozdevice/mozdevice/devicemanagerSUT.py:551: self._logger.warn("unable to kill -%d %s (pid %s)" % testing/mozbase/mozdevice/mozdevice/devicemanagerSUT.py:556: self._logger.warn("unable to kill -%d %s -- not running?" % testing/mozbase/mozdevice/mozdevice/devicemanagerSUT.py:567: self._logger.warn("try %d of %d failed to kill %s" % testing/mozbase/mozdevice/mozdevice/devicemanagerSUT.py:929: self._logger.warn("unable to adjust screen resolution on non Tegra device") At least some of these are calls to a structured logger, which has no warn method. We either need to add "warn" to structuredlog.py or convert these to use "warning".
Comment on attachment 8469968 [details] [diff] [review] Remove uses of logging.warn from DeviceManager, r=wlach Review of attachment 8469968 [details] [diff] [review]: ----------------------------------------------------------------- This looks fine, could you also consider making the structured logger support "warn" as an alias for "warning". This will help facilitate converting code from using either mozlog or old-style python logging to structured logging.
Attachment #8469968 - Flags: review?(wlachance) → review+
Assignee: nobody → james
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: