Prepend script name before logging messages

This is a best practice, and is especially relevant in our system
where there are dozens of places a log message could have been printed
from, and especially for python_venv which trampolines to other
scripts and it is important to distinguish errors coming from
python_venv from the script to run.

TEST=Run bin/turtle
TEST=Run bin/run_tests

Change-Id: Iae4986b4234300eaecc96d3a2513f32887e1ac7f
Commit-Ready: Allen Li <>
Tested-by: Allen Li <>
Reviewed-by: Allen Li <>
diff --git a/bin/python_venv b/bin/python_venv
index 6c50d53..a83371d 100755
--- a/bin/python_venv
+++ b/bin/python_venv
@@ -23,7 +23,7 @@
 readonly bin_dir="$(readlink -e -- "$(dirname -- "$0")")"
 if [[ ! -d "${bin_dir}" ]]; then
-    echo "ERROR: Can not locate the location of python_env!" >&2
+    echo "python_venv: Cannot locate python_env!" >&2
     exit 1
@@ -47,9 +47,9 @@
 readonly create_venv=$(find_create_venv)
 if [[ ! -f "${create_venv}" ]]; then
     cat <<EOF >&2
-ERROR: create_venv script could not be located.
-You need to update a constant inside python_venv, or your checkout might be
+python_venv: create_venv script could not be located
+python_venv: Possible causes: python_venv configured incorrectly or
+python_venv: incomplete repo checkout
     exit 1
@@ -57,8 +57,8 @@
 readonly extra_imports_dir=$(realpath ../venv)
 if [[ ! -d "${extra_imports_dir}" ]]; then
     cat <<EOF >&2
-ERROR: ${bin_dir}/../venv does not exist
-See infra_virtualenv/ for details.
+python_venv: ${bin_dir}/../venv does not exist
+python_venv: See infra_virtualenv/ for details
     exit 1