Share your repls and programming experiences

← Back to all posts
dblogger - Python logging to the Replit Database
jachands (3)

Logging is important, especially for Always On repls where you can't always monitor the console output. That's why I started using the Replit Database to save my logs.

After copying the to your project, logging is easy! Here's an example:

from dblogger import DBLogger
logger = DBLogger('x:log', 500)
# Log something!"Hello logs!")

Want to view your logs? Open python in Shell and run:

from replit import db
for x in db['x:log']: print(list(x))

Logging Methods

Hope it helps! Happy logging :)