Skip to content

feat: New logging category for containerised runtime#16341

Merged
akash1810 merged 2 commits into
mainfrom
aa/container-logs
Jul 8, 2026
Merged

feat: New logging category for containerised runtime#16341
akash1810 merged 2 commits into
mainfrom
aa/container-logs

Conversation

@akash1810

Copy link
Copy Markdown
Member

What does this change?

When running in a container, configure log4js to write info logs to stdout. These logs will then be processed by a sidecar, e.g. https://github.com/guardian/devx-logs/tree/main/ecs.

Why?

Application logs are useful for incident triage.


Closes #16264.

@akash1810 akash1810 requested a review from a team as a code owner July 8, 2026 08:39
@akash1810 akash1810 added the feature Departmental tracking: work on a new feature label Jul 8, 2026
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

Hello 👋! When you're ready to run Chromatic, please apply the run_chromatic label to this PR.

You will need to reapply the label each time you want to run Chromatic.

Click here to see the Chromatic project.

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

@akash1810 akash1810 added the run_chromatic Runs chromatic when label is applied label Jul 8, 2026
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Jul 8, 2026
When running in a container, configure log4js to write info logs to stdout.
These logs will then be processed by a sidecar, e.g. https://github.com/guardian/devx-logs/tree/main/ecs.
@akash1810 akash1810 force-pushed the aa/container-logs branch from 87aa3d5 to bc3180b Compare July 8, 2026 12:18
@akash1810 akash1810 added the run_chromatic Runs chromatic when label is applied label Jul 8, 2026
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Jul 8, 2026
@akash1810 akash1810 requested a review from arelra July 8, 2026 12:32
@akash1810 akash1810 added the run_chromatic Runs chromatic when label is applied label Jul 8, 2026
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Jul 8, 2026
@akash1810 akash1810 merged commit bfac6ab into main Jul 8, 2026
30 checks passed
@akash1810 akash1810 deleted the aa/container-logs branch July 8, 2026 12:54
@gu-prout

gu-prout Bot commented Jul 8, 2026

Copy link
Copy Markdown

Seen on PROD (merged by @akash1810 12 minutes and 40 seconds ago) Please check your changes!

@akash1810

Copy link
Copy Markdown
Member Author

This isn't working quite as expected. It appears that when Log4JS is given an unused fileAppender, it still attempts to create a directory for the log file:

/app/server.js:149305
          throw e;
          ^

Error: EACCES: permission denied, mkdir '/var/log/dotcom-rendering'
    at Object.mkdirSync (node:fs:1350:26)
    at mkdir (/app/server.js:149293:19)
    at RollingFileStream._renewWriteStream (/app/server.js:149322:5)
    at new RollingFileWriteStream (/app/server.js:149117:10)
    at new RollingFileStream (/app/server.js:400016:5)
    at openTheStream (/app/server.js:212595:20)
    at fileAppender (/app/server.js:212615:16)
    at Object.configure (/app/server.js:212675:10)
    at /app/server.js:11243:29
    at Object.onlyOnMaster (/app/server.js:356799:50) {
  errno: -13,
  code: 'EACCES',
  syscall: 'mkdir',
  path: '/var/log/dotcom-rendering'
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Departmental tracking: work on a new feature Seen-on-PROD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Control logging and metrics independently

2 participants