Skip to content

Commit 7d4623b

Browse files
subhrashisdas“NandanAnantharamu”
authored andcommitted
feat: Standardize log patterns across all services for consistency. (#38285)
## Description > [!TIP] > _Add a TL;DR when the description is longer than 500 words or extremely technical (helps the content, marketing, and DevRel team)._ > > _Please also include relevant motivation and context. List any dependencies that are required for this change. Add links to Notion, Figma or any other documents that might be relevant to the PR._ Fixes #`Issue Number` _or_ Fixes `Issue URL` > [!WARNING] > _If no issue exists, please create an issue first, and check with the maintainers if the issue is valid._ ## Automation /ok-to-test tags="@tag.Sanity" ### 🔍 Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/12463955629> > Commit: 1c48cae > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=12463955629&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `@tag.Sanity` > Spec: > <hr>Mon, 23 Dec 2024 09:18:41 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced logging capabilities for various services, including distinct log file paths incorporating hostnames. - Introduced event logging for standard output and error streams. - **Bug Fixes** - Improved error handling through updated logging configurations. - **Chores** - Reorganized configuration parameters for better clarity and management across multiple services. - Increased maximum log file sizes from 10MB to 30MB and set backups to zero for all services. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent fdf80be commit 7d4623b

File tree

6 files changed

+58
-59
lines changed

6 files changed

+58
-59
lines changed
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
[program:backend]
22
command=/opt/appsmith/run-with-env.sh /opt/appsmith/run-java.sh
3-
priority=20
4-
autostart=true
53
autorestart=true
6-
startsecs=20
4+
autostart=true
5+
priority=20
76
startretries=3
8-
stdout_logfile=%(ENV_APPSMITH_LOG_DIR)s/%(program_name)s/%(program_name)s-%(ENV_HOSTNAME)s.log
9-
redirect_stderr=true
10-
stdout_logfile_maxbytes=10MB
11-
stderr_logfile_maxbytes=10MB
12-
stdout_logfile_backups=10
13-
stderr_logfile_backups=10
14-
stdout_events_enabled=true
7+
startsecs=20
158
stderr_events_enabled=true
9+
stderr_logfile=%(ENV_APPSMITH_LOG_DIR)s/%(program_name)s/%(ENV_HOSTNAME)s-stderr.log
10+
stderr_logfile_backups=0
11+
stderr_logfile_maxbytes=30MB
12+
stdout_events_enabled=true
13+
stdout_logfile=%(ENV_APPSMITH_LOG_DIR)s/%(program_name)s/%(ENV_HOSTNAME)s-stdout.log
14+
stdout_logfile_backups=0
15+
stdout_logfile_maxbytes=30MB
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
[program:editor]
22
command=/opt/appsmith/run-with-env.sh /opt/appsmith/run-caddy.sh
3-
priority=25
4-
autostart=true
53
autorestart=true
6-
startsecs=0
4+
autostart=true
5+
priority=25
76
startretries=3
8-
stdout_logfile=%(ENV_APPSMITH_LOG_DIR)s/%(program_name)s/access-%(ENV_HOSTNAME)s.log
9-
stderr_logfile=%(ENV_APPSMITH_LOG_DIR)s/%(program_name)s/error-%(ENV_HOSTNAME)s.log
10-
stdout_logfile_maxbytes=10MB
11-
stderr_logfile_maxbytes=10MB
12-
stdout_logfile_backups=2
13-
stderr_logfile_backups=2
14-
stdout_events_enabled=true
7+
startsecs=0
158
stderr_events_enabled=true
9+
stderr_logfile=%(ENV_APPSMITH_LOG_DIR)s/%(program_name)s/%(ENV_HOSTNAME)s-stderr.log
10+
stderr_logfile_backups=0
11+
stderr_logfile_maxbytes=30MB
12+
stdout_events_enabled=true
13+
stdout_logfile=%(ENV_APPSMITH_LOG_DIR)s/%(program_name)s/%(ENV_HOSTNAME)s-stdout.log
14+
stdout_logfile_backups=0
15+
stdout_logfile_maxbytes=30MB
1616
stopsignal=QUIT
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
[program:rts]
22
directory=/opt/appsmith/rts/bundle
33
command=/opt/appsmith/run-with-env.sh node server.js
4-
priority=15
5-
autostart=true
64
autorestart=true
7-
startsecs=0
5+
autostart=true
6+
priority=15
87
startretries=3
9-
stdout_logfile=%(ENV_APPSMITH_LOG_DIR)s/%(program_name)s/%(program_name)s-%(ENV_HOSTNAME)s.log
10-
redirect_stderr=true
11-
stdout_logfile_maxbytes=10MB
12-
stderr_logfile_maxbytes=10MB
13-
stdout_logfile_backups=2
14-
stderr_logfile_backups=2
15-
stdout_events_enabled=true
8+
startsecs=0
169
stderr_events_enabled=true
10+
stderr_logfile=%(ENV_APPSMITH_LOG_DIR)s/%(program_name)s/%(ENV_HOSTNAME)s-stderr.log
11+
stderr_logfile_backups=0
12+
stderr_logfile_maxbytes=30MB
13+
stdout_events_enabled=true
14+
stdout_logfile=%(ENV_APPSMITH_LOG_DIR)s/%(program_name)s/%(ENV_HOSTNAME)s-stdout.log
15+
stdout_logfile_backups=0
16+
stdout_logfile_maxbytes=30MB
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
[program:mongodb]
22
directory=/appsmith-stacks/data/mongodb
33
command=mongod --port 27017 --dbpath . --logpath %(ENV_APPSMITH_LOG_DIR)s/%(program_name)s/db.log --replSet mr1 --keyFile %(ENV_MONGODB_TMP_KEY_PATH)s --bind_ip localhost
4-
priority=10
5-
autostart=true
64
autorestart=true
7-
startsecs=10
5+
autostart=true
6+
priority=10
87
startretries=3
9-
stdout_logfile=%(ENV_APPSMITH_LOG_DIR)s/%(program_name)s/%(program_name)s.log
10-
redirect_stderr=true
11-
stdout_logfile_maxbytes=10MB
12-
stderr_logfile_maxbytes=10MB
13-
stdout_logfile_backups=2
14-
stderr_logfile_backups=2
15-
stdout_events_enabled=true
8+
startsecs=10
169
stderr_events_enabled=true
10+
stderr_logfile=%(ENV_APPSMITH_LOG_DIR)s/%(program_name)s/%(ENV_HOSTNAME)s-stderr.log
11+
stderr_logfile_backups=0
12+
stderr_logfile_maxbytes=30MB
13+
stdout_events_enabled=true
14+
stdout_logfile=%(ENV_APPSMITH_LOG_DIR)s/%(program_name)s/%(ENV_HOSTNAME)s-stdout.log
15+
stdout_logfile_backups=0
16+
stdout_logfile_maxbytes=30MB

deploy/docker/fs/opt/appsmith/templates/supervisord/postgres.conf

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22
directory=/appsmith-stacks/data/postgres/main
33
user=postgres
44
command=/opt/appsmith/run-postgres.sh
5-
autostart=true
65
autorestart=true
6+
autostart=true
77
startretries=3
8-
stdout_logfile=%(ENV_APPSMITH_LOG_DIR)s/%(program_name)s/%(program_name)s.log
9-
redirect_stderr=true
10-
stdout_logfile_maxbytes=10MB
11-
stderr_logfile_maxbytes=10MB
12-
stdout_logfile_backups=2
13-
stderr_logfile_backups=2
14-
stdout_events_enabled=true
158
stderr_events_enabled=true
16-
9+
stderr_logfile=%(ENV_APPSMITH_LOG_DIR)s/%(program_name)s/%(ENV_HOSTNAME)s-stderr.log
10+
stderr_logfile_backups=0
11+
stderr_logfile_maxbytes=30MB
12+
stdout_events_enabled=true
13+
stdout_logfile=%(ENV_APPSMITH_LOG_DIR)s/%(program_name)s/%(ENV_HOSTNAME)s-stdout.log
14+
stdout_logfile_backups=0
15+
stdout_logfile_maxbytes=30MB

deploy/docker/fs/opt/appsmith/templates/supervisord/redis.conf

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ directory=/etc/redis
33
; The `--save` is for saving session data to disk more often, so recent sessions aren't cleared on restart.
44
; The empty string to `--logfile` is for logging to stdout so that supervisor can capture it.
55
command=redis-server --save 15 1 --dir /appsmith-stacks/data/redis --daemonize no --logfile ""
6-
priority=5
7-
autostart=true
86
autorestart=true
9-
startsecs=0
7+
autostart=true
8+
priority=5
109
startretries=3
11-
stdout_logfile=%(ENV_APPSMITH_LOG_DIR)s/%(program_name)s/%(program_name)s.log
12-
redirect_stderr=true
13-
stdout_logfile_maxbytes=10MB
14-
stderr_logfile_maxbytes=10MB
15-
stdout_logfile_backups=2
16-
stderr_logfile_backups=2
17-
stdout_events_enabled=true
10+
startsecs=0
1811
stderr_events_enabled=true
12+
stderr_logfile=%(ENV_APPSMITH_LOG_DIR)s/%(program_name)s/%(ENV_HOSTNAME)s-stderr.log
13+
stderr_logfile_backups=0
14+
stderr_logfile_maxbytes=30MB
15+
stdout_events_enabled=true
16+
stdout_logfile=%(ENV_APPSMITH_LOG_DIR)s/%(program_name)s/%(ENV_HOSTNAME)s-stdout.log
17+
stdout_logfile_backups=0
18+
stdout_logfile_maxbytes=30MB

0 commit comments

Comments
 (0)