Skip to content

Commit

Permalink
Removed trailing whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
horshack-dpreview committed Sep 3, 2020
1 parent 3df3053 commit 5123b13
Show file tree
Hide file tree
Showing 3 changed files with 276 additions and 276 deletions.
40 changes: 20 additions & 20 deletions applog.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

#
# global variables
#
#
gFileSessionLog = None
gFileLifetimeLog = None
gLoggingFlags = 0
Expand All @@ -53,17 +53,17 @@ def applog_init(loggingFlags=APPLOGF_LEVEL_INFORMATIONAL | APPLOGF_LEVEL_ERROR,
print("Unable to open/create logfile \"{:s}\". {:s}".format(lifetimeLogFilename, str(e)))
return e.errno
return 0

#
# set new logging flags
#
#
def applog_set_loggingFlags(newLoggingFlags):
global gLoggingFlags
gLoggingFlags = newLoggingFlags
gLoggingFlags = newLoggingFlags

#
# shutdown this module
#
#
def applog_shutdown():
try:
if gFileSessionLog:
Expand All @@ -72,7 +72,7 @@ def applog_shutdown():
gFileSessionLog.close()
except IOError as e:
print("Unable to close logfile. {:s}".format(str(e)))

#
# Log message with specified level
#
Expand All @@ -89,31 +89,31 @@ def applog(str, flags=APPLOGF_LEVEL_INFORMATIONAL):
print(timeStampStr + str, file=gFileSessionLog)
if gFileLifetimeLog:
print(timeStampStr + str, file=gFileLifetimeLog)


#
# Logging wrapper functions for each level
#
def applog_i(s):
def applog_i(s):
applog(s, APPLOGF_LEVEL_INFORMATIONAL)
def applog_v(s):
def applog_v(s):
applog(s, APPLOGF_LEVEL_VERBOSE)
def applog_w(s):
def applog_w(s):
applog(s, APPLOGF_LEVEL_WARNING)
def applog_e(s):
def applog_e(s):
applog(s, APPLOGF_LEVEL_ERROR)
def applog_d(s):
def applog_d(s):
applog(s, APPLOGF_LEVEL_DEBUG)

#
# no-console equivalents
#
def applog_i_nc(s):
#
def applog_i_nc(s):
applog(s, APPLOGF_LEVEL_INFORMATIONAL | APPLOGF_DONT_WRITE_TO_CONSOLE)
def applog_d_nc(s):
def applog_d_nc(s):
applog(s, APPLOGF_LEVEL_DEBUG | APPLOGF_DONT_WRITE_TO_CONSOLE)


#
# Logging check-enabled functions, used to avoid
# performance penalty of generating log message
Expand Down
Loading

0 comments on commit 5123b13

Please sign in to comment.