Skip to content

Commit

Permalink
Add FAQ to README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
bahlo committed Apr 3, 2023
1 parent 5b533bf commit 5c9e08f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,16 @@ export const getServerSideProps = withAxiomGetServerSideProps(async ({ req, log
}
});

## FAQ
### How can I send logs from Vercel preview deployments?
The Axiom Vercel integration sets up an environment variable called `NEXT_PUBLIC_AXIOM_INGEST_ENDPOINT`, which by default is only enabled for the production environment. To send logs from preview deployments, go to your site settings in Vercel and enable preview deployments for that environment variable.

### How can I extend the logger?
You can use `log.with` to create an intermediate logger, for example:
```typescript
const logger = log.with({ userId: 42 })
logger.info("Hi") // will ingest { ..., "message": "Hi", "fields" { "userId": 42 }}
```

### License

Expand Down

0 comments on commit 5c9e08f

Please sign in to comment.