You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement separate logging for CLI and web modes with clean launcher scripts
- Create separate log files: logs/application-cli.log and logs/application-web.log
- Add mode-specific system properties in CliApplication and WebApplication entry points
- Configure Logback with time-based rolling policy and size limits
- Suppress verbose Logback status messages for clean CLI experience
- Create cli-app.sh launcher script for clean CLI interface (no Gradle noise)
- Update dev-server.sh to use web-specific log file
- Enable stdin for Gradle run task to support interactive CLI mode
- Update all documentation (README.md, Agent.md, CLAUDE.md) with new commands
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
-**Test**: `./run_tests.sh` (runs tests with formatted output)
6
17
-**Single test**: `./gradlew test --tests "ClassName"`
7
-
-**Run CLI mode**: `./gradlew run` (default)
8
-
-**Run Web mode**: `./gradlew run -Dapp.mode=web`
9
18
-**Clean**: `./gradlew clean`
10
19
20
+
## Logging
21
+
22
+
-**CLI logs**: `logs/application-cli.log` (separate file for CLI mode)
23
+
-**Web logs**: `logs/application-web.log` (separate file for web mode)
24
+
-**Log rotation**: Daily rotation with 30-day retention and 100MB size cap
25
+
-**Clean startup**: No verbose Logback configuration messages in CLI mode
26
+
11
27
## Development Server
12
-
-**Start dev server**: `./dev-server.sh start` (web mode with hot reloading)
13
-
-**Stop dev server**: `./dev-server.sh stop`
14
-
-**Restart dev server**: `./dev-server.sh restart` (needed for static file changes)
15
-
-**Check status**: `./dev-server.sh status`
16
-
-**View logs**: `./dev-server.sh logs`
28
+
29
+
For web development with hot reloading:
30
+
-**Start**: `./dev-server.sh start` (web mode with hot reloading)
31
+
-**Stop**: `./dev-server.sh stop`
32
+
-**Restart**: `./dev-server.sh restart` (needed for static file changes)
33
+
-**Status**: `./dev-server.sh status`
34
+
-**Logs**: `./dev-server.sh logs`
17
35
18
36
**Note**: Hot reloading works for Java code changes. Static files (HTML, CSS, JS) in `src/main/resources/static/` require being "built" (copied to classpath) to trigger live reload - when running from command line with Gradle, this typically requires a server restart to see changes.
-**Log levels**: INFO for application, DEBUG for ConversationService, WARN for Spring/external libs
48
+
27
49
## Development Server
28
50
29
-
For development with hot reloading, use the provided development script:
51
+
For web development with hot reloading:
30
52
31
-
-**Start dev server**: `./dev-server.sh start` (starts web mode with hot reloading)
32
-
-**Stop dev server**: `./dev-server.sh stop`
33
-
-**Restart dev server**: `./dev-server.sh restart`
34
-
-**Check status**: `./dev-server.sh status`
35
-
-**View logs**: `./dev-server.sh logs`
53
+
-**Start**: `./dev-server.sh start` (starts web mode with hot reloading)
54
+
-**Stop**: `./dev-server.sh stop`
55
+
-**Restart**: `./dev-server.sh restart`
56
+
-**Status**: `./dev-server.sh status`
57
+
-**Logs**: `./dev-server.sh logs`
36
58
37
59
The development server includes:
38
60
-**Automatic restart** when Java classes change
39
61
-**Live reload** for static resources and templates (after build)
40
62
-**Development configuration** with disabled caching
41
63
-**Background process management** with PID tracking
64
+
-**Logs to**: `logs/application-web.log`
42
65
43
66
**Note**: Hot reloading works for Java code changes. Static files (HTML, CSS, JS) in `src/main/resources/static/` require being "built" (copied to classpath) to trigger live reload - when running from command line with Gradle, this typically requires a server restart to see changes.
44
67
@@ -68,15 +91,17 @@ The application supports two modes:
0 commit comments