Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable log location #93

Closed
alensiljak opened this issue Dec 29, 2021 · 6 comments
Closed

Configurable log location #93

alensiljak opened this issue Dec 29, 2021 · 6 comments

Comments

@alensiljak
Copy link

Hi! I think it would be great if it was possible to configure a custom location for the log file.

@alensiljak
Copy link
Author

image

OK, I notice the parameter in the command-line output and the help.
I must've been blind.

@alensiljak
Copy link
Author

It would be great if the option could be written into the config and stored.

@ErykPiasecki07
Copy link

I missed that parameter too! Since every book abut UX will tell you: "It's never end-user's fault", maybe there should be something done in regard to exposing that option a bit more? --data and DATA_FILENAME are not very suggestive at first and on every computer there's a lot of data, so I suppose our brains can intuitively skip that phrase. Maybe --logpath or something like this would work?

Or if @larose really finds it a useful feature that more people should know about, maybe make it work a bit like vim?
If you do utt hello it defaults to a path it always does but if you do utt hello path/to/log.txt, it automatically creates log in the desired path?

@larose
Copy link
Owner

larose commented Feb 17, 2022

Hi @mistery and @ErykPiasecki07!

It would be great if the option could be written into the config and stored.

Yes, this can be an option. You are welcome to contribute this change, but don't forget to add tests.

I missed that parameter too! Since every book abut UX will tell you: "It's never end-user's fault", maybe there should be something done in regard to exposing that option a bit more? --data and DATA_FILENAME are not very suggestive at first and on every computer there's a lot of data, so I suppose our brains can intuitively skip that phrase. Maybe --logpath or something like this would work?

I agree with you that --data is probably not the best name. But log usually means the place where we store events that happen during the execution of a program for debugging and troubleshooting. So I think --logpath would also be confusing. Maybe the solution is to simply document what --data means when running utt --help (which has currently no documentation):

$ utt --help
usage: utt [-h] [--data DATA_FILENAME] [--now NOW] [--timezone TIMEZONE] [--version] {add,config,edit,hello,report,stretch} ...

Ultimate Time Tracker (utt) is a simple command-line time tracking application written in Python.

positional arguments:
  {add,config,edit,hello,report,stretch}

optional arguments:
  -h, --help            show this help message and exit
  --data DATA_FILENAME
  --now NOW
  --timezone TIMEZONE
  --version             show program's version number and exit

Or if @larose really finds it a useful feature that more people should know about, maybe make it work a bit like vim? If you do utt hello it defaults to a path it always does but if you do utt hello path/to/log.txt, it automatically creates log in the desired path?

I'm not sure why we would need this when we can already do it with utt --data path/to/log.txt hello.

@ErykPiasecki07
Copy link

Yeah, sometimes the simplest solutions are the best ones, so documenting it is absolutely the way to go. Thanks for your opinion on this matter!

@larose
Copy link
Owner

larose commented Mar 26, 2022

I'm closing this, but anyone is welcome to submit a PR to update the documentation.

@larose larose closed this as completed Mar 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants