Skip to content

Commit

Permalink
Log: use the INFO level instead of the NOTICE one
Browse files Browse the repository at this point in the history
  • Loading branch information
Linkid committed Nov 23, 2017
1 parent 60c60ac commit 243fb65
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 25 deletions.
4 changes: 2 additions & 2 deletions FoFiX.py
Expand Up @@ -220,7 +220,7 @@ def load_config(configPath):
return config

def restart(self):
log.notice("Restarting.")
log.info("Restarting.")
self.engine.audio.close()
self.restartRequested = True

Expand Down Expand Up @@ -253,7 +253,7 @@ def run(self):
while self.engine.run():
pass
except KeyboardInterrupt:
log.notice("Left mainloop due to KeyboardInterrupt.")
log.info("Left mainloop due to KeyboardInterrupt.")
# don't reraise

# Restart the program if the engine is asking that we do so.
Expand Down
6 changes: 3 additions & 3 deletions fofix/core/Data.py
Expand Up @@ -440,9 +440,9 @@ def getImgDrawing(self, fileName, openImage=True):
fileName1 = os.path.join(dataPath, fileName)
if self.logLoadings == 1:
if openImage:
log.notice("Trying to load image: %s" % fileName1)
log.info("Trying to load image: %s" % fileName1)
else:
log.notice("Checking image: %s" % fileName1)
log.info("Checking image: %s" % fileName1)
# check if fileName1 exists (has extension)
if os.path.exists(fileName1):
if openImage:
Expand All @@ -458,7 +458,7 @@ def getImgDrawing(self, fileName, openImage=True):
else:
# find extension
fileName1 = os.path.splitext(fileName1)[0]

# glob parses [] but those are legal chars on Windows, so we must escape them.
# it must be done like this so replacements are not mangled
# by other replacements.
Expand Down
10 changes: 5 additions & 5 deletions fofix/core/GameEngine.py
Expand Up @@ -329,7 +329,7 @@ def _initTheme(self, themename, themepath):
:type themepath: str
"""

log.notice( 'Setting theme %s from "%s"' % (themename,themepath) )
log.info('Setting theme %s from "%s"' % (themename,themepath))

self.theme = None
try:
Expand All @@ -339,20 +339,20 @@ def _initTheme(self, themename, themepath):
# Found it! Load it.
theme = imp.load_module("CustomTheme", fp, pathname, description)
self.theme = theme.CustomTheme(themepath, themename)
log.notice('Theme activated using custom class "%s"' % pathname)
log.info('Theme activated using custom class "%s"' % pathname)
except ImportError as e:
# Unable to load module; log it, but continue with default Theme.
log.error('Failed to load CustomTheme.py from "%s"' % pathname)
finally:
fp.close()
except ImportError:
# CustomTheme.py file is optional, but notify developer anyway.
log.notice("No CustomTheme.py found in theme")
log.info("No CustomTheme.py found in theme")
pass

if self.theme is None:
self.theme = Theme(themepath, themename)
log.notice("Theme activated using built-in Theme class")
log.info("Theme activated using built-in Theme class")
self.task.addTask(self.theme)

def _initStages(self):
Expand Down Expand Up @@ -481,7 +481,7 @@ def startWorld(self, players, maxplayers = None, gameMode = 0, multiMode = 0, al

def finishGame(self):
if not self.world:
log.notice("GameEngine.finishGame called before World created.")
log.info("GameEngine.finishGame called before World created.")
return
self.world.finishGame()
self.world = None
Expand Down
2 changes: 1 addition & 1 deletion fofix/core/Input.py
Expand Up @@ -142,7 +142,7 @@ def __init__(self):
if len(self.midi) == 0:
log.debug("No MIDI input ports found.")
else:
log.notice("MIDI input support is not available; install at least pygame 1.9 to get it.")
log.info("MIDI input support is not available; install at least pygame 1.9 to get it.")

def showMouse(self):
pygame.mouse.set_visible(True)
Expand Down
2 changes: 1 addition & 1 deletion fofix/core/Microphone.py
Expand Up @@ -114,7 +114,7 @@ def run(self, ticks):
chunk = self.mic.read(1024)
except IOError as e:
if e.args[1] == pyaudio.paInputOverflowed:
log.notice('Microphone: ignoring input buffer overflow')
log.info('Microphone: ignoring input buffer overflow')
chunk = '\x00' * 4096
else:
raise
Expand Down
2 changes: 1 addition & 1 deletion fofix/core/Player.py
Expand Up @@ -738,7 +738,7 @@ def keyName(value):
else:
return name + " " + guitarkeynames[j]
else:
log.notice("Key value not found.")
log.info("Key value not found.")
return "Error"

if self.keyCheckerMode == 0:
Expand Down
8 changes: 4 additions & 4 deletions fofix/core/Resource.py
Expand Up @@ -123,7 +123,7 @@ def finish(self):
return

if self.logLoadings == 1:
log.notice("Loaded %s.%s in %.3f seconds" % (self.target.__class__.__name__, self.name, self.time))
log.info("Loaded %s.%s in %.3f seconds" % (self.target.__class__.__name__, self.name, self.time))

if self.exception:
raise self.exception[0], self.exception[1], self.exception[2]
Expand Down Expand Up @@ -210,7 +210,7 @@ def fileName(self, *name, **args):
# read-write path.
readWritePath = os.path.join(getWritableResourcePath(), *name)
if not os.path.isfile(readWritePath) and os.path.isfile(readOnlyPath):
log.notice("Copying '%s' to writable data directory." % "/".join(name))
log.info("Copying '%s' to writable data directory." % "/".join(name))
try:
os.makedirs(os.path.dirname(readWritePath))
except:
Expand All @@ -219,7 +219,7 @@ def fileName(self, *name, **args):
self.makeWritable(readWritePath)
# Create directories if needed
if not os.path.isdir(readWritePath) and os.path.isdir(readOnlyPath):
log.notice("Creating writable directory '%s'." % "/".join(name))
log.info("Creating writable directory '%s'." % "/".join(name))
os.makedirs(readWritePath)
self.makeWritable(readWritePath)
return readWritePath
Expand Down Expand Up @@ -252,7 +252,7 @@ def load(self, target = None, name = None, function = lambda: None, synch = Fals
"""

if self.logLoadings == 1:
log.notice("Loading %s.%s %s" % (target.__class__.__name__, name, synch and "synchronously" or "asynchronously"))
log.info("Loading %s.%s %s" % (target.__class__.__name__, name, synch and "synchronously" or "asynchronously"))

l = Loader(target, name, function, self.resultQueue, self.loaderSemaphore, onLoad = onLoad, onCancel = onCancel)
if synch:
Expand Down
4 changes: 2 additions & 2 deletions fofix/core/Theme.py
Expand Up @@ -62,7 +62,7 @@ def halign(value, default='center'):
def valign(value, default='middle'):
try:
if value.lower() == 'center':
log.notice('Use of "center" for vertical alignment is deprecated. Use "middle" instead.')
log.info('Use of "center" for vertical alignment is deprecated. Use "middle" instead.')
return {'top': TOP,
'middle': MIDDLE, # for consistency with HTML/CSS terminology
'center': MIDDLE, # for temporary backward compatibility
Expand Down Expand Up @@ -124,7 +124,7 @@ def __init__(self, path, name):
if not os.path.exists(self.themePath):
log.warn("Theme: %s does not exist!\n" % self.themePath)
name = Config.get("coffee", "themename")
log.notice("Theme: Attempting fallback to default theme \"%s\"." % name)
log.info("Theme: Attempting fallback to default theme \"%s\"." % name)
self.themePath = os.path.join(Version.dataPath(),"themes", name)
if not os.path.exists(self.themePath):
log.error("Theme: %s does not exist!\nExiting.\n" % self.themePath)
Expand Down
6 changes: 3 additions & 3 deletions fofix/game/Dialogs.py
Expand Up @@ -1990,10 +1990,10 @@ def showMessage(engine, text):
"""
Show a message to the user.
@param engine: Game engine
@param text: Message text
:param engine: Game engine
:param text: Message text
"""
log.notice("%s" % text)
log.info(text)
d = MessageScreen(engine, text)
_runDialog(engine, d)

Expand Down
2 changes: 1 addition & 1 deletion fofix/game/guitarscene/Rockmeter.py
Expand Up @@ -908,7 +908,7 @@ def __init__(self, guitarScene, configFileName, coOp = False):
self.customRMLayers = imp.load_module("CustomRMLayers", fp, pathname, description)
except ImportError:
self.customRMLayers = None
log.notice("Custom Rockmeter layers are not available")
log.info("Custom Rockmeter layers are not available")

# Build the layers
for i in range(Rockmeter._layerLimit):
Expand Down
2 changes: 1 addition & 1 deletion fofix/game/guitarscene/Stage.py
Expand Up @@ -430,7 +430,7 @@ def load(self, libraryName, songName, practiceMode = False):
elif self.songStage == 1: #check for song-specific background
test = True
if not self.engine.loadImgDrawing(self, "background", os.path.join(libraryName, songName, "background")):
log.notice("No song-specific stage found") # evilynux
log.info("No song-specific stage found")
test = False
if test: #does a song-specific background exist?
self.rotationMode = 0
Expand Down
2 changes: 1 addition & 1 deletion fofix/game/song/song.py
Expand Up @@ -2850,7 +2850,7 @@ def start_of_track(self, n_track=0):
log.debug(tempText + tempText2)
self.firstTrack = True
else:
log.notice("This song has multiple tracks, none properly named. Behavior may be erratic.")
log.info("This song has multiple tracks, none properly named. Behavior may be erratic.")

def sequence_name(self, text):
""" Track name encountered in file, see if we can match it to an instrument part. """
Expand Down

0 comments on commit 243fb65

Please sign in to comment.