fix(picker): propagate logs
This commit is contained in:
parent
a827d4f67c
commit
1822714a0c
2 changed files with 13 additions and 2 deletions
|
|
@ -83,6 +83,17 @@ local function setup_problem(contest_id, problem_id, language)
|
|||
state.test_cases = cached_test_cases
|
||||
logger.log(('using cached test cases (%d)'):format(#cached_test_cases))
|
||||
elseif vim.tbl_contains(config.scrapers, state.platform) then
|
||||
local constants = require('cp.constants')
|
||||
local platform_display_name = constants.PLATFORM_DISPLAY_NAMES[state.platform] or state.platform
|
||||
logger.log(
|
||||
('Scraping %s %s %s for test cases, this may take a few seconds...'):format(
|
||||
platform_display_name,
|
||||
contest_id,
|
||||
problem_id
|
||||
),
|
||||
vim.log.levels.WARN
|
||||
)
|
||||
|
||||
local scrape_result = scrape.scrape_problem(ctx)
|
||||
|
||||
if not scrape_result.success then
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ local function get_contests_for_platform(platform)
|
|||
local platform_display_name = constants.PLATFORM_DISPLAY_NAMES[platform] or platform
|
||||
logger.log(
|
||||
('Scraping %s for contests, this may take a few seconds...'):format(platform_display_name),
|
||||
vim.log.levels.INFO
|
||||
vim.log.levels.WARN
|
||||
)
|
||||
|
||||
local plugin_path = utils.get_plugin_path()
|
||||
|
|
@ -125,7 +125,7 @@ local function get_problems_for_contest(platform, contest_id)
|
|||
platform_display_name,
|
||||
contest_id
|
||||
),
|
||||
vim.log.levels.INFO
|
||||
vim.log.levels.WARN
|
||||
)
|
||||
|
||||
local metadata_result = scrape.scrape_contest_metadata(platform, contest_id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue