Overwrite log file (>) instead of append (>>) to it
Open
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 8.9k
- Forks
- 715
- PR merge metrics
- No merged PRs in 30d
Description
Is there option to use > instead of >> default's?
From here https://github.com/javan/whenever/wiki/Output-redirection-aka-logging-your-cron-jobs
# adds ">> /path/to/file.log 2>&1" to all commands
set :output, '/path/to/file.log'
I would like to always overwrite log file before write to it. ("> /path/to/file.log 2>&1")
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the :output setting and the Output redirection documentation linked in the issue. Trace how the default >> /path/to/file.log 2>&1 redirection is assembled, then determine how an option for > /path/to/file.log 2>&1 should be configured and documented. Done means users can select overwrite behavior without changing the default append behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100