Compare commits
2 Commits
feat/time
...
e3effe8b25
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e3effe8b25 | ||
|
|
980c8eb309 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,5 +1,4 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
app.log
|
|
||||||
test/taskchampion.sqlite3
|
test/taskchampion.sqlite3
|
||||||
tasksquire
|
tasksquire
|
||||||
test/*.sqlite3*
|
test/*.sqlite3*
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ ts.StopTask(&task)
|
|||||||
|
|
||||||
## Development Notes
|
## Development Notes
|
||||||
|
|
||||||
- **Logging**: Application logs to `app.log` in current directory
|
- **Logging**: Application logs to `/tmp/tasksquire.log`
|
||||||
- **Virtual Tags**: Filter out Taskwarrior virtual tags (see `virtualTags` map)
|
- **Virtual Tags**: Filter out Taskwarrior virtual tags (see `virtualTags` map)
|
||||||
- **Color Parsing**: Custom color parsing from Taskwarrior config format
|
- **Color Parsing**: Custom color parsing from Taskwarrior config format
|
||||||
- **Debugging**: VSCode launch.json configured for remote debugging on port 43000
|
- **Debugging**: VSCode launch.json configured for remote debugging on port 43000
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ The `Task` struct uses custom `MarshalJSON()` and `UnmarshalJSON()` to handle:
|
|||||||
### Logging
|
### Logging
|
||||||
|
|
||||||
- Uses `log/slog` for structured logging
|
- Uses `log/slog` for structured logging
|
||||||
- Logs written to `app.log` in current directory
|
- Logs written to `/tmp/tasksquire.log`
|
||||||
- Errors logged but execution typically continues (graceful degradation)
|
- Errors logged but execution typically continues (graceful degradation)
|
||||||
- Log pattern: `slog.Error("message", "key", value)`
|
- Log pattern: `slog.Error("message", "key", value)`
|
||||||
|
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ Tasksquire respects your existing Taskwarrior configuration (`.taskrc`). It look
|
|||||||
2. `$HOME/.taskrc`
|
2. `$HOME/.taskrc`
|
||||||
3. `$HOME/.config/task/taskrc`
|
3. `$HOME/.config/task/taskrc`
|
||||||
|
|
||||||
Logging is written to `app.log` in the current working directory.
|
Logging is written to `/tmp/tasksquire.log`.
|
||||||
|
|
||||||
## Development Conventions
|
## Development Conventions
|
||||||
|
|
||||||
|
|||||||
@@ -18,8 +18,6 @@
|
|||||||
version = "0.1.0";
|
version = "0.1.0";
|
||||||
src = ./.;
|
src = ./.;
|
||||||
|
|
||||||
# Update this hash when dependencies change.
|
|
||||||
# You can get the correct hash by running `nix build`.
|
|
||||||
vendorHash = "sha256-fDzQuKBZPkOATMMnYcFv/aJP62XDhL9LjM/UYre9JQ4=";
|
vendorHash = "sha256-fDzQuKBZPkOATMMnYcFv/aJP62XDhL9LjM/UYre9JQ4=";
|
||||||
|
|
||||||
ldflags = [ "-s" "-w" ];
|
ldflags = [ "-s" "-w" ];
|
||||||
|
|||||||
2
main.go
2
main.go
@@ -45,7 +45,7 @@ func main() {
|
|||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
common := common.NewCommon(ctx, ts, tws)
|
common := common.NewCommon(ctx, ts, tws)
|
||||||
|
|
||||||
file, err := os.OpenFile("app.log", os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
|
file, err := os.OpenFile("/tmp/tasksquire.log", os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("failed to open log file: %v", err)
|
log.Fatalf("failed to open log file: %v", err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user