MCPcopy Create free account
hub / github.com/PlatformLab/NanoLog / generateLogIdStr

Function generateLogIdStr

preprocessor/FunctionGenerator.py:893–897  ·  view source on GitHub ↗
(fmtString, filename, linenum)

Source from the content-addressed store, hash-verified

891 return "__fmtId" + logId
892
893def generateLogIdStr(fmtString, filename, linenum):
894 def encode(string):
895 return "".join([c if c.isalnum() else str(ord(c)) for c in string])
896
897 return "__%s__%s__%d__" % (encode(fmtString), encode(filename), linenum)

Calls 1

encodeFunction · 0.85