Importers: standardise file logging
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Existing behaviour
-
Gitlab::Import::Loggerinherits fromGitlab::JsonLogger to log JSON toimporter.log`. - These loggers inherit from
Gitlab::Import::Loggerand only set the importer name:Gitlab::GithubImport::LoggerGitlab::BitbucketImport::LoggerGitlab::BitbucketServerImport::Logger
- These loggers inherit from
Gitlab::Import::Loggerand add significant functionality:-
BulkImports::Logger: Addswith_entityandwith_trackerto build JSON payload based on current import.
-
- The following importers reference
Gitlab::Import::Loggerdirectly:Gitlab::JiraImport
- The following importers don't seem to do significant file logging:
Gitlab::FogbugzImportGitlab::GithubGistsImportGitlab::LegacyGithubImport
Proposal
Import::Framework::Logger will be responsible for all file logging behavior across our importers.
- It logs JSON to an output file.
- It raises an error in development if key identifiers are missing.1
Since most of our logging behaviour is covered by Gitlab::Import::Logger, I think our approach to file-based logging is already pretty well standardised.
Edited by 🤖 GitLab Bot 🤖