Skip to content

Commit 45e3a47

Browse files
committed
move to loggers
1 parent 5cebd9b commit 45e3a47

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

git_theta/scripts/git_theta.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ def install(args):
120120
"""
121121
# check if git-lfs is installed and abort if not
122122
if not git_utils.is_git_lfs_installed():
123-
# TODO(bdlester): Move to a logger that writes to stderror?
124-
print(
123+
logger = logging.getLogger("git_theta")
124+
logger.error(
125125
"git-theta depends on git-lfs and it does not appear to be installed. See installation directions at https://github.com/r-three/git-theta/blob/main/README.md#git-lfs-installation"
126126
)
127127
sys.exit(1)
@@ -144,8 +144,8 @@ def track(args):
144144
"""
145145
repo = git_utils.get_git_repo()
146146
if not git_utils.is_git_theta_installed():
147-
# TODO(bdlester): Move to a logger that writes to stderror?
148-
print(
147+
logger = logging.getLogger("git_theta")
148+
logger.error(
149149
"You are trying to track a file with git-theta, but git-theta is not installed, please run `git theta install`."
150150
)
151151
sys.exit(1)
@@ -163,9 +163,9 @@ def track(args):
163163
def add(args, unparsed_args):
164164
repo = git_utils.get_git_repo()
165165
if not git_utils.is_git_theta_installed():
166-
# TODO(bdlester): Move to a logger that writes to stderror?
167-
print(
168-
"You are trying to track a file with git-theta, but git-theta is not installed, please run `git theta install`."
166+
logger = logging.getLogger("git_theta")
167+
logger.error(
168+
"You are trying to add a file using git-theta, but git-theta is not installed, please run `git theta install`."
169169
)
170170
sys.exit(1)
171171
env_vars = {

0 commit comments

Comments
 (0)