https://github.com/HazyResearch/deepdive
Revision 57fa6e3622728be85727b5aa99c0727889e6dc89 authored by Raphael Hoffmann on 30 December 2015, 01:40:52 UTC, committed by Raphael Hoffmann on 31 December 2015, 01:22:09 UTC
1 parent e86bd69
Raw File
Tip revision: 57fa6e3622728be85727b5aa99c0727889e6dc89 authored by Raphael Hoffmann on 30 December 2015, 01:40:52 UTC
Adds schema support
Tip revision: 57fa6e3
logging-with-ts
#!/usr/bin/env bash
# logging-with-ts -- Logs stdin to a file with timestamp on each line
set -eu
if [[ $# -gt 0 ]]; then
    for f; do mkdir -p "$(dirname "$f")"; done
    exec ts "%F %H:%M:%.S" | tee -a "$@"
else
    exec ts "%F %H:%M:%.S"
fi
back to top