Skip to content

Commit e32e170

Browse files
farnabazatinux
andauthored
feat: enable worker logs with default settings (#566)
Co-authored-by: Sébastien Chopin <[email protected]>
1 parent e770eac commit e32e170

File tree

5 files changed

+62
-2
lines changed

5 files changed

+62
-2
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
title: Worker logs with history on NuxtHub Admin
3+
description: Worker logs are now available on NuxtHub Admin, allowing you to filter and analyze historical logs from your deployed Nuxt App.
4+
date: 2025-05-08
5+
image: '/images/changelog/nuxthub-workers-logs-history.png'
6+
authors:
7+
- name: Sebastien Chopin
8+
avatar:
9+
src: https://avatars.githubusercontent.com/u/904724?v=4
10+
to: https://bsky.app/profile/atinux.com
11+
username: atinux
12+
- name: Rihan Arfan
13+
avatar:
14+
src: https://avatars.githubusercontent.com/u/20425781?v=4
15+
to: https://bsky.app/profile/rihan.dev
16+
username: rihan.dev
17+
- name: Ahad Birang
18+
avatar:
19+
src: https://avatars.githubusercontent.com/u/2047945?v=4
20+
to: https://bsky.app/profile/farnabaz.dev
21+
username: farnabaz.dev
22+
---
23+
24+
::tip
25+
Worker logs are available from [`@nuxthub/core >= v0.8.27`](https://github.com/nuxt-hub/core/releases/tag/v0.8.27). In the latest version, Worker Logs are enabled by default.
26+
::
27+
28+
It is now possible to view, filter and analyze worker logs within the NuxtHub Admin.
29+
30+
The logs page are refactored to be more user-friendly and easier to use. The new UI is easier to read and allows you to view the whole log message. This new logs page is available for both Pages and Workers.
31+
32+
![Worker logs](/images/changelog/worker-logs-admin.png){class="border border-default rounded"}
33+
34+
## Enable Worker Logs
35+
36+
Worker logs are enabled by default in the latest version of NuxtHub core module (`@nuxthub/core >= v0.8.27`).
37+
38+
39+
::note
40+
If you are using older versions and you cannot upgrade, you can enable Worker Logs by setting `hub.bindings.observability.logs` to `true` in your `nuxt.config.ts`.
41+
42+
```ts
43+
export default defineNuxtConfig({
44+
hub: {
45+
bindings: {
46+
observability: {
47+
logs: true,
48+
},
49+
},
50+
},
51+
});
52+
```
53+
::
54+
55+
::callout{to="/changelog/observability-additional-bindings" icon="i-lucide-book"}
56+
Learn more about enabling Worker Logs and additional bindings.
57+
::

docs/content/index.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ hero:
1010
light: '/images/landing/hero-light.svg'
1111
dark: '/images/landing/hero-dark.svg'
1212
headline:
13-
label: "Introducing hubAutoRAG()"
14-
to: /changelog/hub-autorag
13+
label: "Workers logs with history"
14+
to: /changelog/workers-logs-history
1515
icon: i-lucide-arrow-right
1616
features:
1717
- title: Cloud Hosting
Loading
Loading

src/module.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ export default defineNuxtModule<ModuleOptions>({
7878
openapi: nuxt.options.nitro.experimental?.openAPI === true,
7979
// Extra bindings for the project
8080
bindings: {
81+
observability: {
82+
logs: true // enable with default settings
83+
},
8184
hyperdrive: {},
8285
compatibilityFlags: nuxt.options.nitro.cloudflare?.wrangler?.compatibility_flags
8386
},

0 commit comments

Comments
 (0)