Skip to content

Astro.logger not working with Cloudflare Adapter #17823

Description

@Keshav-writes-code

Astro Info

Astro                    v7.2.7
Node                     v24.15.0
System                   Linux (x64)
Package Manager          bun
Output                   server
Adapter                  @astrojs/cloudflare
Integrations             none

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

when using context.logger or Astro.logger functions in a output: "server" astro app with cloudflare adapter, the logger api doesn't log anything to the console. console.log() works but it prefixes it with time [vite] message like this

12:19:00 [vite] hello from console log

but with node adapter, it doesn't and behves correctly

12:21:39 [ERROR] Error from Astro.logger.error()
Hello from console.log()

What's the expected result?

it should behave like how node adapter behaves

Link to Minimal Reproducible Example

https://github.com/keshav-templates/astro-looger-cloudflare-bug-2026.git

Participation

  • I am willing to submit a pull request for this issue.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    - P4: importantViolate documented behavior or significantly impacts performance (priority)pkg: astroRelated to the core `astro` package (scope)pkg: cloudflareRelated to the Cloudflare adaptertriage: fix verifiedReporter confirmed the triage bot fix works

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions