Move log
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,5 +1,4 @@
|
||||
.DS_Store
|
||||
app.log
|
||||
test/taskchampion.sqlite3
|
||||
tasksquire
|
||||
test/*.sqlite3*
|
||||
|
||||
@@ -201,7 +201,7 @@ ts.StopTask(&task)
|
||||
|
||||
## 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)
|
||||
- **Color Parsing**: Custom color parsing from Taskwarrior config format
|
||||
- **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
|
||||
|
||||
- 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)
|
||||
- Log pattern: `slog.Error("message", "key", value)`
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ Tasksquire respects your existing Taskwarrior configuration (`.taskrc`). It look
|
||||
2. `$HOME/.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
|
||||
|
||||
|
||||
2
main.go
2
main.go
@@ -45,7 +45,7 @@ func main() {
|
||||
ctx := context.Background()
|
||||
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 {
|
||||
log.Fatalf("failed to open log file: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user