Where is site.logger
in Lume 2?
#524
Answered
by
ngdangtu-vn
ngdangtu-vn
asked this question in
Q&A
-
Some plugin developers might need to know it as now the |
Beta Was this translation helpful? Give feedback.
Answered by
ngdangtu-vn
Dec 10, 2023
Replies: 1 comment
-
In Lume 1, to print message on console, we tend to use In Lume 1: // We need Site object to use logger
site.logger.log('message')
site.logger.warn('warning') In Lume 2: // We only have to call it from a utll module
import { log } from 'lume/core/utils/log.ts'
// Come with more flavour
log.info(msg)
log.debug(msg)
log.warning(msg)
log.error(msg)
log.critical(msg) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
ngdangtu-vn
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In Lume 1, to print message on console, we tend to use
site.logger
. This feature has breaking change in Lume 2 with it own utils modulelume/core/utils/log.ts
.In Lume 1:
In Lume 2: