-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Indexer core #103
Indexer core #103
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @bogdanfazakas
Just a couple of suggestions as i think you could make a little bit better use of our custom logger :-)
for instance, when you create the custom Logger you could specify the module as 'Indexer, rather than 'Database'
export const INDEXER_LOGGER: CustomNodeLogger = getCustomLoggerForModule(
LOGGER_MODULE_NAMES.DATABASE, // INDEXER
LOG_LEVELS_STR.LEVEL_INFO,
defaultConsoleTransport
)
And when you're logging, you could set the log level directly by calling 'log(level,message,includeModuleName)
' // include module name
instead of always setting log level before and after the message, like:
INDEXER_LOGGER.loggerOptions.level = LOG_LEVELS_STR.LEVEl_ERROR
INDEXER_LOGGER.logMessage('Error retrieving last indexed block')
INDEXER_LOGGER.loggerOptions.level = LOG_LEVELS_STR.LEVEL_INFO
thanks 👍
thanks for the hints, will update |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alright 👍
Fixes #21 .
Changes proposed in this PR:
need to add chunkSize
need db interaction to save the last indexed block and get the last indexed block