middleware: update log