Forums

What is the "#015" in event log?

Hello there! My application outputs some log info and a barcode. Some at the beginning there are a few spaces and characters "#015" which shifted the barcode and make it fail to work. I deployed the same application on other platform like heroku and it worked fine. Not sure what could cause this issue? Can anyone please advise?

Feb 2 02:30:46 █#015[INFO][2023-02-02 02:30:46][config.py:19] - [INIT] load config: ...

Feb 2 02:30:49 Downloading QR code. Feb 2 02:30:49 #015██████████████████████████████████████████████████████████████████████████████ Feb 2 02:30:49 ██ ████ ████ ████████ ██████ ██ ██████ ██

How does the code that produces it look like?

For the logs:

config = json.loads(config_str)
logger.info("[INIT] load config: {}".format(config))

For barcode it's itchat package:

def startup(self):
        # login by scan QRCode
        itchat.auto_login(enableCmdQR=2)

I'm a bit confused -- are you somehow logging the barcode to the server's log file, perhaps using Unicode characters or something like that to represent it?

I think the issue is generally when I output the log info to stdout some additional characters and white spaces are also output upfront. (I don't want to tunnel-vision to that barcode part. :))

How is your logging configured?