'How do I tail logs from Cloudflare pages, when I have deployed a Sveltekit application using the '@sveltejs/adapter-cloudflare' package?
I have deployed a SvelteKit project to Cloudflare pages, using the @sveltejs/adapter-cloudflare
package. My svelte.config.js
file looks like this:
import preprocess from 'svelte-preprocess';
import cloudflare from '@sveltejs/adapter-cloudflare';
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://github.com/sveltejs/svelte-preprocess
// for more information about preprocessors
preprocess: [
preprocess({
postcss: true
})
],
kit: {
adapter: cloudflare(),
// hydrate the <div id="svelte"> element in src/app.html
target: '#svelte',
files: {
lib: './src'
},
vite: {
optimizeDeps: {
include: []
}
}
}
};
export default config;
When I look in the Cloudflare pages dashboard, I can tell it's being deployed as a pages app. But how do I tail the logs?
There is a tool called wrangler - tried using wrangler tail
, but I don't know how to configure the required `wrangler.tool file.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|