Closed ThisIsMissEm closed 4 months ago
The types are already imported from this subpath https://github.com/adonisjs/logger/blob/a90ad3c16d885b41fd97c9f6857efa5b8647f626/package.json#L14
@thetutlage yeah, the issue is that there's no way to access these types from the @adonisjs/core/logger
import, hence adding the export here.
You can access it like that :
import type { Level } from '@adonisjs/core/types/logger'
@ThisIsMissEm can we close this ?
Sure
π Linked issue
None, as this is a very small change.
β Type of change
π Description
Whilst working on a kafka package for Adonis v6, I needed the ability to type a
KAFKA_LOG_LEVEL
value, which is the same as the Pino log levels. I thought I could just do:But this doesn't work, instead I'd need to add
@adonisjs/logger
as adevDependency
andpeerDependency
to our project, instead of just relying on@adonisjs/core
, and then change that type import to:I feel like the former is probably a more expected way to use this type, hence opening this pull request.
π Checklist