mirror of
https://github.com/rharkor/caching-for-turbo.git
synced 2025-06-09 17:44:48 +09:00
refactor: logging
This commit is contained in:
parent
519a9df230
commit
38ccb2efe5
8 changed files with 10 additions and 16 deletions
8
dist/setup/index.js
generated
vendored
8
dist/setup/index.js
generated
vendored
|
@ -126840,7 +126840,7 @@ async function getCache(ctx, hash) {
|
|||
const client = (0, utils_1.getCacheClient)();
|
||||
const cacheKey = (0, constants_1.getCacheKey)(hash);
|
||||
const { data } = await client.query(cacheKey, constants_1.cachePath);
|
||||
ctx.log.info(`Cache lookup for ${cacheKey}`);
|
||||
ctx.log.info(`Cache lookup for ${cacheKey} (path: ${constants_1.cachePath})`);
|
||||
if (!data) {
|
||||
ctx.log.info(`Cache lookup did not return data`);
|
||||
return null;
|
||||
|
@ -126985,7 +126985,7 @@ function getCacheClient() {
|
|||
};
|
||||
const response = await twirpClient.GetCacheEntryDownloadURL(request);
|
||||
if (!response.ok) {
|
||||
core.debug(`Cache not found for version ${request.version} of keys: ${keys.join(', ')}`);
|
||||
core.info(`Cache not found for version ${request.version} of keys: ${keys.join(', ')}`);
|
||||
return { success: true, data: undefined };
|
||||
}
|
||||
core.info(`Cache hit for: ${request.key}`);
|
||||
|
@ -127058,9 +127058,7 @@ const path_1 = __nccwpck_require__(16928);
|
|||
const env_1 = __nccwpck_require__(51363);
|
||||
exports.serverPort = 41230;
|
||||
exports.cachePath = 'turbogha_v2';
|
||||
exports.cachePrefix = core.getInput('cache-prefix')
|
||||
? `${exports.cachePath}-${core.getInput('cache-prefix')}`
|
||||
: exports.cachePath;
|
||||
exports.cachePrefix = core.getInput('cache-prefix') || exports.cachePath;
|
||||
const getCacheKey = (hash, tag) => `${exports.cachePrefix}${hash}${tag ? `#${tag}` : ''}`;
|
||||
exports.getCacheKey = getCacheKey;
|
||||
exports.serverLogFile = env_1.env.RUNNER_TEMP
|
||||
|
|
2
dist/setup/index.js.map
generated
vendored
2
dist/setup/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue