Add logging OS version. Deprioritize some messages to debug, so devs can run at info level with less spam (and much less impact on recalc times).

This commit is contained in:
Ebag333
2017-03-18 13:27:07 -07:00
parent 9c693cd7ed
commit 0ccd812398
4 changed files with 10 additions and 3 deletions

View File

@@ -174,7 +174,7 @@ class Effect(EqBase):
self.__runTime = "normal"
self.__activeByDefault = True
self.__type = None
pyfalog.warning("ImportError generating handler: {0}", e)
pyfalog.debug("ImportError generating handler: {0}", e)
except (AttributeError) as e:
# Effect probably exists but there is an issue with it. Turn it into a dummy effect so we can continue, but flag it with an error.
self.__handler = effectDummy

View File

@@ -242,7 +242,6 @@ class TargetingMiscViewMinimal(StatsView):
# forces update of probe size, since this stat is used by both sig radius and sensor str
if labelName == "labelFullSigRadius":
print "labelName"
if fit:
label.SetToolTip(wx.ToolTip("Probe Size: %.3f" % (fit.probeSize or 0)))
else:

View File

@@ -17,8 +17,11 @@
# along with pyfa. If not, see <http://www.gnu.org/licenses/>.
# ===============================================================================
import wx
import platform
import sys
import wx
import config
try:
@@ -76,6 +79,8 @@ class ErrorFrame(wx.Frame):
errorTextCtrl.SetFont(wx.Font(8, wx.FONTFAMILY_TELETYPE, wx.NORMAL, wx.NORMAL))
mainSizer.Add(errorTextCtrl, 0, wx.EXPAND | wx.ALL | wx.ALIGN_CENTER, 5)
errorTextCtrl.AppendText("OS version: \t" + str(platform.platform()))
errorTextCtrl.AppendText("\n")
errorTextCtrl.AppendText("Python: \t" + '{}.{}.{}'.format(v.major, v.minor, v.micro))
errorTextCtrl.AppendText("\n")
errorTextCtrl.AppendText("wxPython: \t" + str(wx.__version__))

View File

@@ -18,6 +18,7 @@
# along with pyfa. If not, see <http://www.gnu.org/licenses/>.
# ==============================================================================
import platform
import os
import re
import sys
@@ -242,6 +243,8 @@ if __name__ == "__main__":
except ValueError, Exception:
pyfalog.critical("Cannot redirect. Continuing without writing stderr to log.")
pyfalog.info("OS version: {0}", platform.platform())
pyfalog.info("Python version: {0}", sys.version)
if sys.version_info < (2, 7) or sys.version_info > (3, 0):
exit_message = "Pyfa requires python 2.x branch ( >= 2.7 ).\nExiting."