Skip to content

Commit

Permalink
Improved performance of logging to stdout
Browse files Browse the repository at this point in the history
refs TryGhost/framework@66cfc15
refs TryGhost/framework@be5ddf2
ref https://linear.app/ghost/issue/ENG-2005/improve-stdout-logging-performance

- most of the technical context is in the 2 commits but this commit just
  bumps the packages so we can take advantage of the lovely improvements
  • Loading branch information
daniellockyer committed Feb 12, 2025
1 parent da18254 commit 931ae33
Show file tree
Hide file tree
Showing 16 changed files with 109 additions and 32 deletions.
2 changes: 1 addition & 1 deletion ghost/activitypub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
],
"devDependencies": {
"@tryghost/identity-token-service": "0.0.0",
"@tryghost/logging": "2.4.19",
"@tryghost/logging": "2.4.20",
"c8": "10.1.2",
"knex": "3.1.0",
"mocha": "10.8.2",
Expand Down
4 changes: 2 additions & 2 deletions ghost/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
"@tryghost/link-redirects": "0.0.0",
"@tryghost/link-replacer": "0.0.0",
"@tryghost/link-tracking": "0.0.0",
"@tryghost/logging": "2.4.18",
"@tryghost/logging": "2.4.20",
"@tryghost/magic-link": "0.0.0",
"@tryghost/mail-events": "0.0.0",
"@tryghost/mailgun-client": "0.0.0",
Expand Down Expand Up @@ -259,7 +259,7 @@
},
"resolutions": {
"@tryghost/errors": "1.3.5",
"@tryghost/logging": "2.4.18",
"@tryghost/logging": "2.4.20",
"jackspeak": "2.1.1",
"moment": "2.24.0",
"moment-timezone": "0.5.45"
Expand Down
2 changes: 1 addition & 1 deletion ghost/domain-events/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"lib"
],
"devDependencies": {
"@tryghost/logging": "2.4.18",
"@tryghost/logging": "2.4.20",
"c8": "8.0.1",
"mocha": "10.2.0",
"should": "13.2.3"
Expand Down
2 changes: 1 addition & 1 deletion ghost/email-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@tryghost/errors": "1.3.5",
"@tryghost/html-to-plaintext": "0.0.0",
"@tryghost/kg-default-cards": "10.0.10",
"@tryghost/logging": "2.4.18",
"@tryghost/logging": "2.4.20",
"@tryghost/tpl": "0.1.32",
"@tryghost/validator": "0.2.14",
"bson-objectid": "2.0.4",
Expand Down
2 changes: 1 addition & 1 deletion ghost/job-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"dependencies": {
"@breejs/later": "4.2.0",
"@tryghost/errors": "1.3.5",
"@tryghost/logging": "2.4.18",
"@tryghost/logging": "2.4.20",
"bree": "6.5.0",
"cron-validate": "1.4.5",
"fastq": "1.19.0",
Expand Down
2 changes: 1 addition & 1 deletion ghost/mailgun-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
"dependencies": {
"@tryghost/debug": "0.1.32",
"@tryghost/logging": "2.4.18",
"@tryghost/logging": "2.4.20",
"@tryghost/metrics": "1.0.34",
"form-data": "4.0.0",
"lodash": "4.17.21",
Expand Down
2 changes: 1 addition & 1 deletion ghost/members-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"dependencies": {
"@tryghost/domain-events": "0.0.0",
"@tryghost/errors": "1.3.5",
"@tryghost/logging": "2.4.18",
"@tryghost/logging": "2.4.20",
"@tryghost/magic-link": "0.0.0",
"@tryghost/member-events": "0.0.0",
"@tryghost/members-payments": "0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion ghost/members-events-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"dependencies": {
"@tryghost/domain-events": "0.0.0",
"@tryghost/errors": "1.3.5",
"@tryghost/logging": "2.4.18",
"@tryghost/logging": "2.4.20",
"@tryghost/member-events": "0.0.0",
"moment-timezone": "0.5.34"
}
Expand Down
2 changes: 1 addition & 1 deletion ghost/members-importer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"dependencies": {
"@tryghost/errors": "1.3.5",
"@tryghost/logging": "2.4.18",
"@tryghost/logging": "2.4.20",
"@tryghost/members-csv": "0.0.0",
"@tryghost/metrics": "1.0.34",
"@tryghost/tpl": "0.1.32",
Expand Down
2 changes: 1 addition & 1 deletion ghost/oembed-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"dependencies": {
"@extractus/oembed-extractor": "3.2.1",
"@tryghost/errors": "1.3.5",
"@tryghost/logging": "2.4.18",
"@tryghost/logging": "2.4.20",
"@tryghost/tpl": "0.1.32",
"charset": "1.0.1",
"cheerio": "0.22.0",
Expand Down
2 changes: 1 addition & 1 deletion ghost/prometheus-metrics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"typescript": "5.6.2"
},
"dependencies": {
"@tryghost/logging": "2.4.19",
"@tryghost/logging": "2.4.20",
"express": "4.21.2",
"prom-client": "15.1.3",
"stoppable": "1.1.0"
Expand Down
2 changes: 1 addition & 1 deletion ghost/stripe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@tryghost/debug": "0.1.32",
"@tryghost/domain-events": "0.0.0",
"@tryghost/errors": "1.3.5",
"@tryghost/logging": "2.4.18",
"@tryghost/logging": "2.4.20",
"@tryghost/member-events": "0.0.0",
"leaky-bucket": "2.2.0",
"lodash": "4.17.21",
Expand Down
2 changes: 1 addition & 1 deletion ghost/update-check-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"dependencies": {
"@tryghost/debug": "0.1.32",
"@tryghost/errors": "1.3.5",
"@tryghost/logging": "2.4.18",
"@tryghost/logging": "2.4.20",
"@tryghost/tpl": "0.1.32",
"lodash": "4.17.21",
"moment": "2.24.0"
Expand Down
2 changes: 1 addition & 1 deletion ghost/webmentions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"dependencies": {
"@tryghost/errors": "1.3.5",
"@tryghost/logging": "2.4.18",
"@tryghost/logging": "2.4.20",
"cheerio": "0.22.0"
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
},
"resolutions": {
"@tryghost/errors": "1.3.5",
"@tryghost/logging": "2.4.18",
"@tryghost/logging": "2.4.20",
"jackspeak": "2.1.1",
"moment": "2.24.0",
"moment-timezone": "0.5.45"
Expand Down
109 changes: 93 additions & 16 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7642,6 +7642,14 @@
"@tryghost/root-utils" "^0.3.31"
debug "^4.3.1"

"@tryghost/debug@^0.1.34":
version "0.1.34"
resolved "https://registry.yarnpkg.com/@tryghost/debug/-/debug-0.1.34.tgz#cac7100b092b358e54637ed620dc9cd9ac76355c"
integrity sha512-TuTI/BCktv3NY+QhJWrcDBRN6qxgy7zgKHj18MzCZEqPVRXdzYdsd8ldO/Q7jSNgHjf0UHuwDTc5VFuNzCUABA==
dependencies:
"@tryghost/root-utils" "^0.3.32"
debug "^4.3.1"

"@tryghost/elasticsearch@^3.0.21":
version "3.0.21"
resolved "https://registry.npmjs.org/@tryghost/elasticsearch/-/elasticsearch-3.0.21.tgz#a4acbfccf1577d1f7c9750018cbd30afefa87b3a"
Expand All @@ -7651,6 +7659,15 @@
"@tryghost/debug" "^0.1.32"
split2 "4.2.0"

"@tryghost/elasticsearch@^3.0.23":
version "3.0.23"
resolved "https://registry.yarnpkg.com/@tryghost/elasticsearch/-/elasticsearch-3.0.23.tgz#45563fdaa8969cd153bacae7b8538b45681d467c"
integrity sha512-6j5plnUmdPtOqX8FpwEf5jDWx2MeojvOXhCLViD5DxiOFtG0PSQENNBFpKywHuiabNFTc7rcHkX4PUhOYimBWg==
dependencies:
"@elastic/elasticsearch" "8.13.1"
"@tryghost/debug" "^0.1.34"
split2 "4.2.0"

"@tryghost/[email protected]":
version "0.3.8"
resolved "https://registry.yarnpkg.com/@tryghost/email-mock-receiver/-/email-mock-receiver-0.3.8.tgz#17480deaa75e8c0e66560969c0f13e39b8ce6196"
Expand All @@ -7672,7 +7689,7 @@
focus-trap "^6.7.2"
postcss-preset-env "^7.3.1"

"@tryghost/[email protected]", "@tryghost/[email protected]", "@tryghost/errors@^1.2.26", "@tryghost/errors@^1.2.3", "@tryghost/errors@^1.3.5", "@tryghost/errors@^1.3.6":
"@tryghost/[email protected]", "@tryghost/[email protected]", "@tryghost/errors@^1.2.26", "@tryghost/errors@^1.2.3", "@tryghost/errors@^1.3.5", "@tryghost/errors@^1.3.6", "@tryghost/errors@^1.3.7":
version "1.3.5"
resolved "https://registry.yarnpkg.com/@tryghost/errors/-/errors-1.3.5.tgz#f4ef8e5c41a8a37456f2285271124180685827ae"
integrity sha512-iOkiHGnYFqSdFM9AVlgiL56Qcx6V9iQ3kbDKxyOAxrhMKq1OnOmOm7tr1CgGK1YDte9XYEZmR9hUZEg+ujn/jQ==
Expand Down Expand Up @@ -7710,13 +7727,13 @@
resolved "https://registry.yarnpkg.com/@tryghost/http-cache-utils/-/http-cache-utils-0.1.17.tgz#9dd01464cfa52947fa0b63ea57ef084106ff42ba"
integrity sha512-sO/C2nCX3C4sPz1ysN8/9em8dbhnSUGP0d84CjZsSrs/DYzZmw1nWJGKzDF80mOpYIs34GGL+JhybRRTlOrviA==

"@tryghost/http-stream@^0.1.33":
version "0.1.33"
resolved "https://registry.yarnpkg.com/@tryghost/http-stream/-/http-stream-0.1.33.tgz#8c74d63c0ad764e0a889709751ed6379d387daab"
integrity sha512-6DC/YmpEF/u8aez8e3+Xc4MkihSILP5EfErQsrUCT3QcdaEIxR+3u1JlsH9Qe7U5ld1wN7tzDS45mFDQy96G6Q==
"@tryghost/http-stream@^0.1.35":
version "0.1.35"
resolved "https://registry.yarnpkg.com/@tryghost/http-stream/-/http-stream-0.1.35.tgz#9b2e645ce6875303c4686dc131be4743fd072cf6"
integrity sha512-JjxQ+PljIskf3tvf3f+We+ZJvaCo2JEkZmKhYN2aq4iPkzu8ikmOGdjlIXOG9QoT25+bG1vcLdp4DM9fcRlLxA==
dependencies:
"@tryghost/errors" "^1.3.5"
"@tryghost/request" "^1.0.8"
"@tryghost/errors" "^1.3.7"
"@tryghost/request" "^1.0.10"

"@tryghost/[email protected]":
version "1.3.0"
Expand Down Expand Up @@ -7895,16 +7912,16 @@
lodash "^4.17.21"
luxon "^1.26.0"

"@tryghost/[email protected]", "@tryghost/[email protected]", "@tryghost/[email protected].19", "@tryghost/logging@^2.4.7":
version "2.4.18"
resolved "https://registry.yarnpkg.com/@tryghost/logging/-/logging-2.4.18.tgz#5d7ddb2d0a66dc6834a6048ebbf48418420445d5"
integrity sha512-mMJkdCFDXa0ohS0FlDTvOrJQd7VamBIqjljGYvNECdVli7BMjdUYgZyWr8bEJ/d7scsq8OE2bVVBJWLxvPxLAg==
"@tryghost/[email protected]", "@tryghost/[email protected]", "@tryghost/[email protected].20", "@tryghost/logging@^2.4.7":
version "2.4.20"
resolved "https://registry.yarnpkg.com/@tryghost/logging/-/logging-2.4.20.tgz#251cff0911014829816d865667104fcd4ac25b7f"
integrity sha512-7fpg8xuJHrgAgGhtJjY9nH5vAj8RY2SvcPLkOvD/7leou47ZdSu15l+bUBNFAsx9mAI7AdozDRCAv3WuTkV7cw==
dependencies:
"@tryghost/bunyan-rotating-filestream" "^0.0.7"
"@tryghost/elasticsearch" "^3.0.21"
"@tryghost/http-stream" "^0.1.33"
"@tryghost/pretty-stream" "^0.1.26"
"@tryghost/root-utils" "^0.3.30"
"@tryghost/elasticsearch" "^3.0.23"
"@tryghost/http-stream" "^0.1.35"
"@tryghost/pretty-stream" "^0.1.28"
"@tryghost/root-utils" "^0.3.32"
bunyan "^1.8.15"
bunyan-loggly "^1.4.2"
fs-extra "^11.0.0"
Expand Down Expand Up @@ -8001,6 +8018,15 @@
moment "^2.29.1"
prettyjson "^1.2.5"

"@tryghost/pretty-stream@^0.1.28":
version "0.1.28"
resolved "https://registry.yarnpkg.com/@tryghost/pretty-stream/-/pretty-stream-0.1.28.tgz#2cff88b3a6cb6f1c1b7dd08c27fb9f6351da487e"
integrity sha512-iA3Jxw4ltiHKPBZMnvYN3TP26O2RdQBH051BNY+qrSJjx8DhLVverjXlwCC3fxfOTTiPDtx1aMMLlW4RkACtlQ==
dependencies:
date-format "^4.0.14"
lodash "^4.17.21"
prettyjson "^1.2.5"

"@tryghost/[email protected]":
version "0.3.12"
resolved "https://registry.yarnpkg.com/@tryghost/promise/-/promise-0.3.12.tgz#90aff21f256767f1d1c06f358f5cf4012552cb34"
Expand All @@ -8011,7 +8037,7 @@
resolved "https://registry.yarnpkg.com/@tryghost/promise/-/promise-0.3.8.tgz#3134a044e187f6d61393267c680c6cc75235aa96"
integrity sha512-ppcnLBWczpbo4sQcGWtjEA82kdZMv4NFF2MvZRi1MBP4lSOSgh9A636eUxlB1/FpIG+D5ixq84xlY4QJMqW2kA==

"@tryghost/[email protected]", "@tryghost/request@^1.0.8":
"@tryghost/[email protected]":
version "1.0.8"
resolved "https://registry.yarnpkg.com/@tryghost/request/-/request-1.0.8.tgz#d2b87fe30bfaa1d9011a8e58152b941161465113"
integrity sha512-wto/TG5xQ6xq8sKEI/N66C+dxSFORusk4yjtsqZNV3E4LEFfg/2HzrIYH6YW9Iip15uR4u0uKhFRMs0J1RRCuA==
Expand All @@ -8023,6 +8049,18 @@
got "13.0.0"
lodash "^4.17.21"

"@tryghost/request@^1.0.10":
version "1.0.10"
resolved "https://registry.yarnpkg.com/@tryghost/request/-/request-1.0.10.tgz#6127d7069483fe7eba1f907af649f1b337a3cd3c"
integrity sha512-WAmevpwAuwdqqRpAGWIS7mZd4wmSLqKqIFUiW1kFy6UVQX8fNDR8IrryB+3gwzHxrTDUbZLi6cOoXSqSB5GkwA==
dependencies:
"@tryghost/errors" "^1.3.7"
"@tryghost/validator" "^0.2.16"
"@tryghost/version" "^0.1.32"
cacheable-lookup "7.0.0"
got "13.0.0"
lodash "^4.17.21"

"@tryghost/[email protected]":
version "0.3.30"
resolved "https://registry.npmjs.org/@tryghost/root-utils/-/root-utils-0.3.30.tgz#766818cd4394b683338f4d9fccc52c435f77b0b5"
Expand All @@ -8039,6 +8077,14 @@
caller "^1.0.1"
find-root "^1.1.0"

"@tryghost/root-utils@^0.3.32":
version "0.3.32"
resolved "https://registry.yarnpkg.com/@tryghost/root-utils/-/root-utils-0.3.32.tgz#686acf0aa4e1ab4b2578fc0acf9fe552d51f73f1"
integrity sha512-fR//LmG+5iapR6sHsh727nD5xu0cLPtEhPpsI8cy/chaBADmJyWMr6ewzq/HenjKxyOH6LIT7Bdmv+kEUvu+Fg==
dependencies:
caller "^1.0.1"
find-root "^1.1.0"

"@tryghost/server@^0.1.37":
version "0.1.37"
resolved "https://registry.yarnpkg.com/@tryghost/server/-/server-0.1.37.tgz#04ee5671b19a4a5be05e361e293d47eb9c6c2482"
Expand Down Expand Up @@ -8078,6 +8124,13 @@
dependencies:
lodash.template "^4.5.0"

"@tryghost/tpl@^0.1.34":
version "0.1.34"
resolved "https://registry.yarnpkg.com/@tryghost/tpl/-/tpl-0.1.34.tgz#f732577f4d34a44edf9705f4cf9b8d53c46c9239"
integrity sha512-zL3vewM8Pai1SVJiGDPBIVj7+4moDKtcDO9qQl2JblQLXfdxKuDmkh/OoJTGny/wVSANaN57/ZtqFmUPslmqrg==
dependencies:
lodash.template "^4.5.0"

"@tryghost/[email protected]":
version "4.4.8"
resolved "https://registry.yarnpkg.com/@tryghost/url-utils/-/url-utils-4.4.8.tgz#fb867d8bd59a640dc67ab61c1a3d921bd12a8c2b"
Expand All @@ -8102,6 +8155,17 @@
moment-timezone "^0.5.23"
validator "7.2.0"

"@tryghost/validator@^0.2.16":
version "0.2.16"
resolved "https://registry.yarnpkg.com/@tryghost/validator/-/validator-0.2.16.tgz#d98fa6e6684fcb3c460646cbd9e18b15964441ee"
integrity sha512-CO/sdVdgQh9vQiSenJ64flB2C5nVs/1vb/EnnJtjjPNZvSWt+JvdCihVXyIjmX8pRBEbwVcSK1VKaD4Jwiok4Q==
dependencies:
"@tryghost/errors" "^1.3.7"
"@tryghost/tpl" "^0.1.34"
lodash "^4.17.21"
moment-timezone "^0.5.23"
validator "7.2.0"

"@tryghost/[email protected]", "@tryghost/version@^0.1.30":
version "0.1.30"
resolved "https://registry.yarnpkg.com/@tryghost/version/-/version-0.1.30.tgz#0f6b0eb5e89edcaf829c9199727b6199977b609b"
Expand All @@ -8110,6 +8174,14 @@
"@tryghost/root-utils" "^0.3.30"
semver "^7.3.5"

"@tryghost/version@^0.1.32":
version "0.1.32"
resolved "https://registry.yarnpkg.com/@tryghost/version/-/version-0.1.32.tgz#0118381ab297119a10050ed124883a6ee9dd0c87"
integrity sha512-rLYLvSQGDYsqsZ3a8bolZAMh6Hk/uWd9mdDYhyydZZ8hqibdojtRBgJEg68PpuKKEpY429/abZMpK4HId/wzHA==
dependencies:
"@tryghost/root-utils" "^0.3.32"
semver "^7.3.5"

"@tryghost/[email protected]":
version "0.2.14"
resolved "https://registry.yarnpkg.com/@tryghost/webhook-mock-receiver/-/webhook-mock-receiver-0.2.14.tgz#6a62bff89a330e69c0112bd688ab25900df91149"
Expand Down Expand Up @@ -14305,6 +14377,11 @@ [email protected], date-fns@^2.28.0, date-fns@^2.30.0:
dependencies:
"@babel/runtime" "^7.21.0"

date-format@^4.0.14:
version "4.0.14"
resolved "https://registry.yarnpkg.com/date-format/-/date-format-4.0.14.tgz#7a8e584434fb169a521c8b7aa481f355810d9400"
integrity sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg==

date-time@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/date-time/-/date-time-2.1.0.tgz#0286d1b4c769633b3ca13e1e62558d2dbdc2eba2"
Expand Down

0 comments on commit 931ae33

Please sign in to comment.