Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Add timestamp to log
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from datetime import datetime
import fileinput
for line in fileinput.input():
print(f'[{}] {line}', end='')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment