feat: use logger
This commit is contained in:
@ -2,6 +2,7 @@ import { HandlerContext } from "$fresh/server.ts";
|
||||
import { getMovieCredits } from "@lib/tmdb.ts";
|
||||
import * as cache from "@lib/cache/cache.ts";
|
||||
import { json } from "@lib/helpers.ts";
|
||||
import { createLogger } from "@lib/log.ts";
|
||||
|
||||
type CachedMovieCredits = {
|
||||
lastUpdated: number;
|
||||
@ -10,6 +11,8 @@ type CachedMovieCredits = {
|
||||
|
||||
const CACHE_INTERVAL = 1000 * 60 * 24 * 30;
|
||||
|
||||
const log = createLogger("api/tmdb");
|
||||
|
||||
export const handler = async (
|
||||
_req: Request,
|
||||
_ctx: HandlerContext,
|
||||
@ -22,7 +25,7 @@ export const handler = async (
|
||||
});
|
||||
}
|
||||
|
||||
console.log("[api] getting movie credits");
|
||||
log.debug("getting movie credits");
|
||||
|
||||
const cacheId = `/movie/credits/${id}`;
|
||||
|
||||
|
Reference in New Issue
Block a user