Server Logging to File
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 1
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
## Feature Request: Server Logging to File
### Summary
Add server-side logging functionality to write all incoming CLI commands and server actions to a log file.
This will help with debugging, auditing, and tracking CLI interactions with the server.
### Motivation
Currently, the server runs without a persistent log of events.
Without logging, it’s difficult to:
- Debug issues
- Trace executed commands
- Audit system usage
Logging to a file will provide a historical record of server activity.
### Requirements
- Log all incoming commands from the CLI client.
- Log server responses and actions taken.
- Include timestamps in each log entry.
- Allow specifying the log file path via configuration or CLI flag.
- Use a simple, readable log format (e.g., `[YYYY-MM-DD HH:MM:SS] LEVEL: message`).
- Ensure logs are appended, not overwritten.
- Handle concurrent writes safely.
### Acceptance Criteria
- [ ] A configuration option exists for setting the log file path.
- [ ] Commands and responses are logged with timestamps.
- [ ] Logs persist between server restarts.
- [ ] Logging does not block server execution (asynchronous or buffered writes preferred).
- [ ] Option to disable logging for performance or privacy reasons.
- [ ] Privacy option to disable logging message content.
- [ ] Privacy option to disable logging phone numbers.
### Example Log Output
```plaintext
[2025-08-23 11:32:15] INFO: Received command: send text 5511999999999 "Hello!"
[2025-08-23 11:32:15] INFO: Message sent to 5511999999999
[2025-08-23 11:33:02] ERROR: Failed to connect to WhatsApp Websocket
```
Contributor guide
No contributing guide indexed for this repository
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 by locating the server and CLI command-handling entry points, then trace where server actions and responses are produced. Define how configuration, concurrency, buffering, disabling, and privacy filtering should work before implementation. Done means persistent, timestamped logs meet every listed acceptance criterion without blocking normal server execution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100