From a11a70d941019ad779f04f9e4d904100c03abdca Mon Sep 17 00:00:00 2001 From: wang yan Date: Thu, 2 Apr 2020 14:08:52 +0800 Subject: [PATCH] move logger from common to lib The logger is the fundamental library, so move it into lib folder Signed-off-by: wang yan --- src/chartserver/cache.go | 2 +- src/chartserver/chart_operator.go | 2 +- src/chartserver/controller.go | 2 +- src/chartserver/handler_manipulation.go | 2 +- src/chartserver/handler_repo.go | 2 +- src/chartserver/handler_utility.go | 2 +- src/chartserver/reverse_proxy.go | 2 +- src/common/api/base.go | 2 +- src/common/config/encrypt/encrypt.go | 2 +- src/common/config/manager.go | 2 +- src/common/config/metadata/value.go | 2 +- src/common/config/store/driver/db.go | 2 +- src/common/config/store/driver/rest.go | 2 +- src/common/config/store/driver/rest_test.go | 2 +- src/common/config/store/store.go | 2 +- src/common/config/store/store_test.go | 2 +- src/common/dao/admin_job.go | 2 +- src/common/dao/base.go | 2 +- src/common/dao/config.go | 2 +- src/common/dao/cve_whitelist.go | 2 +- src/common/dao/dao_test.go | 2 +- src/common/dao/group/usergroup.go | 2 +- src/common/dao/group/usergroup_test.go | 2 +- src/common/dao/notification/notification_job.go | 2 +- src/common/dao/oidc_user.go | 2 +- src/common/dao/pgsql.go | 2 +- src/common/dao/project.go | 2 +- src/common/dao/project/projectmember.go | 2 +- src/common/dao/project/projectmember_test.go | 2 +- src/common/dao/quota.go | 2 +- src/common/dao/testutils.go | 2 +- src/common/dao/user.go | 2 +- src/common/quota/manager.go | 2 +- src/common/rbac/project_evaluator.go | 2 +- src/common/registryctl/client.go | 2 +- src/common/security/local/context.go | 2 +- src/common/security/local/context_test.go | 2 +- src/common/security/robot/context_test.go | 2 +- src/common/security/secret/context.go | 2 +- src/common/utils/email/mail.go | 2 +- src/common/utils/ldap/ldap.go | 2 +- src/common/utils/ldap/ldap_test.go | 2 +- src/common/utils/oidc/helper.go | 2 +- src/common/utils/oidc/secret.go | 2 +- src/common/utils/passports.go | 2 +- src/common/utils/redis/helper.go | 2 +- src/common/utils/test/database.go | 2 +- src/common/utils/uaa/client.go | 2 +- src/common/utils/utils.go | 2 +- src/controller/artifact/controller.go | 2 +- src/controller/artifact/processor/chart/chart.go | 2 +- src/controller/artifact/processor/cnab/cnab.go | 2 +- src/controller/artifact/processor/image/index.go | 2 +- src/controller/artifact/processor/image/manifest_v1.go | 2 +- src/controller/artifact/processor/image/manifest_v2.go | 2 +- src/controller/artifact/processor/processor.go | 2 +- src/controller/blob/controller.go | 2 +- src/controller/event/handler/auditlog/auditlog.go | 2 +- src/controller/event/handler/internal/artifact.go | 2 +- src/controller/event/handler/replication/replication.go | 2 +- src/controller/event/handler/util/util.go | 2 +- src/controller/event/handler/webhook/artifact/artifact.go | 2 +- src/controller/event/handler/webhook/artifact/replication.go | 2 +- src/controller/event/handler/webhook/chart/chart.go | 2 +- src/controller/event/handler/webhook/quota/quota.go | 2 +- src/controller/event/handler/webhook/scan/delete.go | 2 +- src/controller/event/handler/webhook/scan/scan.go | 2 +- src/controller/project/controller.go | 2 +- src/controller/quota/controller.go | 2 +- src/controller/quota/driver/project/project.go | 2 +- src/controller/quota/util.go | 2 +- src/controller/repository/controller.go | 2 +- src/controller/scan/all_handler.go | 2 +- src/controller/scan/base_controller.go | 2 +- src/controller/scanner/base_controller.go | 2 +- src/controller/tag/controller.go | 2 +- src/core/api/admin_job.go | 2 +- src/core/api/base.go | 2 +- src/core/api/chart_repository.go | 2 +- src/core/api/config.go | 2 +- src/core/api/email.go | 2 +- src/core/api/health.go | 2 +- src/core/api/internal.go | 2 +- src/core/api/ldap.go | 2 +- src/core/api/metadata.go | 2 +- src/core/api/models/admin_job.go | 2 +- src/core/api/notification_policy.go | 2 +- src/core/api/oidc.go | 2 +- src/core/api/project.go | 2 +- src/core/api/registry.go | 2 +- src/core/api/search.go | 2 +- src/core/api/statistic.go | 2 +- src/core/api/sys_cve_whitelist.go | 2 +- src/core/api/systeminfo.go | 2 +- src/core/api/user.go | 2 +- src/core/api/usergroup.go | 2 +- src/core/auth/authenticator.go | 2 +- src/core/auth/authproxy/auth.go | 2 +- src/core/auth/ldap/ldap.go | 2 +- src/core/auth/ldap/ldap_test.go | 2 +- src/core/auth/uaa/uaa.go | 2 +- src/core/config/config.go | 2 +- src/core/controllers/base.go | 2 +- src/core/controllers/oidc.go | 2 +- src/core/main.go | 2 +- src/core/promgr/pmsdriver/local/local.go | 2 +- src/core/promgr/promgr.go | 2 +- src/core/service/notifications/admin/handler.go | 2 +- src/core/service/notifications/jobs/handler.go | 2 +- src/core/service/notifications/scheduler/handler.go | 2 +- src/core/service/token/authutils.go | 2 +- src/core/service/token/creator.go | 2 +- src/core/service/token/token.go | 2 +- src/core/systeminfo/imagestorage/filesystem/driver.go | 2 +- src/core/utils/response_handlers.go | 2 +- src/jobservice/config/config.go | 2 +- src/jobservice/hook/hook_client.go | 2 +- src/jobservice/logger/backend/db_logger.go | 2 +- src/jobservice/logger/backend/db_logger_test.go | 2 +- src/jobservice/logger/backend/file_logger.go | 2 +- src/jobservice/logger/backend/std_logger.go | 2 +- src/jobservice/logger/backend/utils.go | 2 +- src/jobservice/logger/backend/utils_test.go | 2 +- src/jobservice/logger/entry_test.go | 2 +- src/jobservice/logger/getter/db_getter_test.go | 2 +- src/jobservice/logger/sweeper/db_sweeper_test.go | 2 +- src/lib/errors/errors.go | 2 +- src/{common/utils => lib}/log/context.go | 0 src/{common/utils => lib}/log/formatter.go | 0 src/{common/utils => lib}/log/level.go | 0 src/{common/utils => lib}/log/level_test.go | 0 src/{common/utils => lib}/log/logger.go | 0 src/{common/utils => lib}/log/logger_test.go | 0 src/{common/utils => lib}/log/record.go | 0 src/{common/utils => lib}/log/textformatter.go | 0 src/lib/orm/orm.go | 2 +- src/lib/q/builder.go | 2 +- src/lib/selector/candidate.go | 2 +- src/migration/artifact.go | 2 +- src/migration/migration.go | 2 +- src/pkg/artifact/model.go | 2 +- src/pkg/authproxy/http.go | 2 +- src/pkg/notification/hook/hook.go | 2 +- src/pkg/notification/notification.go | 2 +- src/pkg/notification/policy/manager/manager.go | 2 +- src/pkg/notifier/event/event.go | 2 +- src/pkg/notifier/notifier.go | 2 +- src/pkg/notifier/topic/topics.go | 2 +- src/pkg/permission/evaluator/admin/admin.go | 2 +- src/pkg/permission/evaluator/rbac/casbin_match.go | 2 +- src/pkg/registry/auth/bearer/cache.go | 2 +- src/pkg/retention/launcher.go | 2 +- src/pkg/retention/policy/action/performer.go | 2 +- src/pkg/retention/policy/alg/or/processor.go | 2 +- src/pkg/retention/policy/rule/dayspl/evaluator.go | 2 +- src/pkg/retention/policy/rule/daysps/evaluator.go | 2 +- src/pkg/retention/policy/rule/lastx/evaluator.go | 2 +- src/pkg/retention/policy/rule/latestk/evaluator.go | 2 +- src/pkg/retention/policy/rule/latestpl/evaluator.go | 2 +- src/pkg/retention/policy/rule/latestps/evaluator.go | 2 +- src/pkg/robot/controller.go | 2 +- src/pkg/scan/dao/scan/report.go | 2 +- src/pkg/scan/init.go | 2 +- src/pkg/scan/whitelist/manager.go | 2 +- src/pkg/scan/whitelist/manager_test.go | 2 +- src/pkg/scheduler/scheduler.go | 2 +- src/pkg/signature/manager.go | 2 +- src/pkg/signature/notary/helper.go | 2 +- src/pkg/signature/notary/transport.go | 2 +- src/pkg/token/options.go | 2 +- src/pkg/token/token.go | 2 +- src/registryctl/api/health.go | 2 +- src/registryctl/api/registry.go | 2 +- src/registryctl/client/client.go | 2 +- src/registryctl/handlers/handler.go | 2 +- src/registryctl/main.go | 2 +- src/replication/adapter/aliacr/adapter.go | 2 +- src/replication/adapter/aliacr/auth.go | 2 +- src/replication/adapter/awsecr/adapter.go | 2 +- src/replication/adapter/awsecr/auth.go | 2 +- src/replication/adapter/azurecr/adapter.go | 2 +- src/replication/adapter/dockerhub/adapter.go | 2 +- src/replication/adapter/dockerhub/client.go | 2 +- src/replication/adapter/gitlab/adapter.go | 2 +- src/replication/adapter/gitlab/client.go | 2 +- src/replication/adapter/googlegcr/adapter.go | 2 +- src/replication/adapter/harbor/adapter.go | 2 +- src/replication/adapter/harbor/image_registry.go | 2 +- src/replication/adapter/helmhub/adapter.go | 2 +- src/replication/adapter/helmhub/chart_registry.go | 2 +- src/replication/adapter/huawei/huawei_adapter.go | 2 +- src/replication/adapter/jfrog/adapter.go | 2 +- src/replication/adapter/native/adapter.go | 2 +- src/replication/adapter/quayio/adapter.go | 2 +- src/replication/dao/execution.go | 2 +- src/replication/event/handler.go | 2 +- src/replication/operation/controller.go | 2 +- src/replication/operation/flow/copy.go | 2 +- src/replication/operation/flow/deletion.go | 2 +- src/replication/operation/flow/stage.go | 2 +- src/replication/policy/controller/controller.go | 2 +- src/replication/policy/manager/manager.go | 2 +- src/replication/policy/scheduler/scheduler.go | 2 +- src/replication/registry/healthcheck.go | 2 +- src/replication/registry/manager.go | 2 +- src/replication/replication.go | 2 +- src/replication/transfer/chart/transfer.go | 2 +- src/replication/transfer/chart/transfer_test.go | 2 +- src/replication/transfer/image/transfer.go | 2 +- src/replication/transfer/image/transfer_test.go | 2 +- src/server/error/error.go | 2 +- src/server/middleware/artifactinfo/artifact_info.go | 2 +- src/server/middleware/blob/copy_artifact.go | 2 +- src/server/middleware/blob/post_initiate_blob_upload.go | 2 +- src/server/middleware/blob/put_blob_upload.go | 2 +- src/server/middleware/blob/put_manifest.go | 2 +- src/server/middleware/csrf/csrf.go | 2 +- src/server/middleware/immutable/pushmf.go | 2 +- src/server/middleware/log/log.go | 2 +- src/server/middleware/log/log_test.go | 2 +- src/server/middleware/quota/copy_artifact.go | 2 +- src/server/middleware/quota/post_initiate_blob_upload.go | 2 +- src/server/middleware/quota/put_blob_upload.go | 2 +- src/server/middleware/quota/put_manifest.go | 2 +- src/server/middleware/quota/quota.go | 2 +- src/server/middleware/security/auth_proxy.go | 2 +- src/server/middleware/security/basic_auth.go | 2 +- src/server/middleware/security/idtoken.go | 2 +- src/server/middleware/security/oidc_cli.go | 2 +- src/server/middleware/security/robot.go | 2 +- src/server/middleware/security/secret.go | 2 +- src/server/middleware/security/security.go | 2 +- src/server/middleware/security/session.go | 2 +- src/server/middleware/security/unauthorized.go | 2 +- src/server/middleware/transaction/transaction.go | 2 +- src/server/middleware/v2auth/auth.go | 2 +- src/server/middleware/vulnerable/vulnerable.go | 2 +- src/server/registry/manifest.go | 2 +- src/server/v2.0/handler/assembler/vul.go | 2 +- src/server/v2.0/handler/base.go | 2 +- src/server/v2.0/handler/model/artifact.go | 2 +- src/server/v2.0/handler/repository.go | 2 +- src/server/v2.0/handler/util.go | 2 +- src/testing/chart_utility.go | 2 +- 244 files changed, 236 insertions(+), 236 deletions(-) rename src/{common/utils => lib}/log/context.go (100%) rename src/{common/utils => lib}/log/formatter.go (100%) rename src/{common/utils => lib}/log/level.go (100%) rename src/{common/utils => lib}/log/level_test.go (100%) rename src/{common/utils => lib}/log/logger.go (100%) rename src/{common/utils => lib}/log/logger_test.go (100%) rename src/{common/utils => lib}/log/record.go (100%) rename src/{common/utils => lib}/log/textformatter.go (100%) diff --git a/src/chartserver/cache.go b/src/chartserver/cache.go index 32c681c58..8d3bbb607 100644 --- a/src/chartserver/cache.go +++ b/src/chartserver/cache.go @@ -7,7 +7,7 @@ import ( "time" beego_cache "github.com/astaxie/beego/cache" - hlog "github.com/goharbor/harbor/src/common/utils/log" + hlog "github.com/goharbor/harbor/src/lib/log" // Enable redis cache adaptor _ "github.com/astaxie/beego/cache/redis" diff --git a/src/chartserver/chart_operator.go b/src/chartserver/chart_operator.go index daf4b8753..5ca0f4079 100644 --- a/src/chartserver/chart_operator.go +++ b/src/chartserver/chart_operator.go @@ -12,7 +12,7 @@ import ( "github.com/Masterminds/semver" "github.com/goharbor/harbor/src/common/models" - hlog "github.com/goharbor/harbor/src/common/utils/log" + hlog "github.com/goharbor/harbor/src/lib/log" "k8s.io/helm/pkg/chartutil" "k8s.io/helm/pkg/proto/hapi/chart" helm_repo "k8s.io/helm/pkg/repo" diff --git a/src/chartserver/controller.go b/src/chartserver/controller.go index 5afa772ca..18ebd69c0 100644 --- a/src/chartserver/controller.go +++ b/src/chartserver/controller.go @@ -7,7 +7,7 @@ import ( "net/url" "os" - hlog "github.com/goharbor/harbor/src/common/utils/log" + hlog "github.com/goharbor/harbor/src/lib/log" ) const ( diff --git a/src/chartserver/handler_manipulation.go b/src/chartserver/handler_manipulation.go index 42e714916..90877ab60 100644 --- a/src/chartserver/handler_manipulation.go +++ b/src/chartserver/handler_manipulation.go @@ -10,7 +10,7 @@ import ( "github.com/ghodss/yaml" commonhttp "github.com/goharbor/harbor/src/common/http" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/replication" rep_event "github.com/goharbor/harbor/src/replication/event" "github.com/goharbor/harbor/src/replication/model" diff --git a/src/chartserver/handler_repo.go b/src/chartserver/handler_repo.go index 390330c89..54a091114 100644 --- a/src/chartserver/handler_repo.go +++ b/src/chartserver/handler_repo.go @@ -10,7 +10,7 @@ import ( "github.com/ghodss/yaml" helm_repo "k8s.io/helm/pkg/repo" - hlog "github.com/goharbor/harbor/src/common/utils/log" + hlog "github.com/goharbor/harbor/src/lib/log" ) const ( diff --git a/src/chartserver/handler_utility.go b/src/chartserver/handler_utility.go index 71e45ea47..87286159c 100644 --- a/src/chartserver/handler_utility.go +++ b/src/chartserver/handler_utility.go @@ -9,8 +9,8 @@ import ( "github.com/pkg/errors" "k8s.io/helm/cmd/helm/search" - hlog "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/config" + hlog "github.com/goharbor/harbor/src/lib/log" ) const ( diff --git a/src/chartserver/reverse_proxy.go b/src/chartserver/reverse_proxy.go index 5aaf27502..2625ad712 100644 --- a/src/chartserver/reverse_proxy.go +++ b/src/chartserver/reverse_proxy.go @@ -16,8 +16,8 @@ import ( "github.com/goharbor/harbor/src/common" commonhttp "github.com/goharbor/harbor/src/common/http" - hlog "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/controller/event/metadata" + hlog "github.com/goharbor/harbor/src/lib/log" n_event "github.com/goharbor/harbor/src/pkg/notifier/event" "github.com/goharbor/harbor/src/replication" rep_event "github.com/goharbor/harbor/src/replication/event" diff --git a/src/common/api/base.go b/src/common/api/base.go index 95356cd8a..465ad29d3 100644 --- a/src/common/api/base.go +++ b/src/common/api/base.go @@ -24,7 +24,7 @@ import ( "github.com/astaxie/beego" "github.com/astaxie/beego/validation" commonhttp "github.com/goharbor/harbor/src/common/http" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" serror "github.com/goharbor/harbor/src/server/error" ) diff --git a/src/common/config/encrypt/encrypt.go b/src/common/config/encrypt/encrypt.go index e70c6a100..9a26c7f9c 100644 --- a/src/common/config/encrypt/encrypt.go +++ b/src/common/config/encrypt/encrypt.go @@ -19,7 +19,7 @@ import ( "sync" "github.com/goharbor/harbor/src/common/utils" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" ) var ( diff --git a/src/common/config/manager.go b/src/common/config/manager.go index d99868657..c1fe7518e 100644 --- a/src/common/config/manager.go +++ b/src/common/config/manager.go @@ -26,7 +26,7 @@ import ( "github.com/goharbor/harbor/src/common/http/modifier/auth" "github.com/goharbor/harbor/src/common/models" "github.com/goharbor/harbor/src/common/utils" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" ) // CfgManager ... Configure Manager diff --git a/src/common/config/metadata/value.go b/src/common/config/metadata/value.go index abdb8d8dd..7d268faca 100644 --- a/src/common/config/metadata/value.go +++ b/src/common/config/metadata/value.go @@ -17,7 +17,7 @@ package metadata import ( "errors" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" ) var ( diff --git a/src/common/config/store/driver/db.go b/src/common/config/store/driver/db.go index 97b6568cb..2d733754d 100644 --- a/src/common/config/store/driver/db.go +++ b/src/common/config/store/driver/db.go @@ -22,7 +22,7 @@ import ( "github.com/goharbor/harbor/src/common/dao" "github.com/goharbor/harbor/src/common/models" "github.com/goharbor/harbor/src/common/utils" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" ) // Database - Used to load/save configuration in database diff --git a/src/common/config/store/driver/rest.go b/src/common/config/store/driver/rest.go index 04a5120e4..607b932b6 100644 --- a/src/common/config/store/driver/rest.go +++ b/src/common/config/store/driver/rest.go @@ -6,7 +6,7 @@ import ( commonhttp "github.com/goharbor/harbor/src/common/http" "github.com/goharbor/harbor/src/common/http/modifier" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" ) // RESTDriver - config store driver based on REST API diff --git a/src/common/config/store/driver/rest_test.go b/src/common/config/store/driver/rest_test.go index 445fd21f0..e7b887730 100644 --- a/src/common/config/store/driver/rest_test.go +++ b/src/common/config/store/driver/rest_test.go @@ -2,7 +2,7 @@ package driver import ( "encoding/json" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/stretchr/testify/assert" "io/ioutil" "net/http" diff --git a/src/common/config/store/store.go b/src/common/config/store/store.go index fe33fdd90..790fd4dbb 100644 --- a/src/common/config/store/store.go +++ b/src/common/config/store/store.go @@ -7,7 +7,7 @@ import ( "github.com/goharbor/harbor/src/common/config/metadata" "github.com/goharbor/harbor/src/common/config/store/driver" "github.com/goharbor/harbor/src/common/utils" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "sync" ) diff --git a/src/common/config/store/store_test.go b/src/common/config/store/store_test.go index efc3c772c..5b29755ae 100644 --- a/src/common/config/store/store_test.go +++ b/src/common/config/store/store_test.go @@ -4,7 +4,7 @@ import ( "github.com/goharbor/harbor/src/common/config/metadata" "github.com/goharbor/harbor/src/common/config/store/driver" "github.com/goharbor/harbor/src/common/dao" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/stretchr/testify/assert" "os" "testing" diff --git a/src/common/dao/admin_job.go b/src/common/dao/admin_job.go index b816d6b33..a2b9e356d 100644 --- a/src/common/dao/admin_job.go +++ b/src/common/dao/admin_job.go @@ -19,7 +19,7 @@ import ( "github.com/astaxie/beego/orm" "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" ) // AddAdminJob ... diff --git a/src/common/dao/base.go b/src/common/dao/base.go index 49b19e951..92fe40265 100644 --- a/src/common/dao/base.go +++ b/src/common/dao/base.go @@ -23,7 +23,7 @@ import ( "github.com/astaxie/beego/orm" "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" ) const ( diff --git a/src/common/dao/config.go b/src/common/dao/config.go index c12111e9c..8f72a2dea 100644 --- a/src/common/dao/config.go +++ b/src/common/dao/config.go @@ -18,7 +18,7 @@ import ( "github.com/goharbor/harbor/src/common" "github.com/goharbor/harbor/src/common/models" "github.com/goharbor/harbor/src/common/utils" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" ) // AuthModeCanBeModified determines whether auth mode can be diff --git a/src/common/dao/cve_whitelist.go b/src/common/dao/cve_whitelist.go index 645a1c076..7096f8673 100644 --- a/src/common/dao/cve_whitelist.go +++ b/src/common/dao/cve_whitelist.go @@ -18,7 +18,7 @@ import ( "encoding/json" "fmt" "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" ) // CreateCVEWhitelist creates the CVE whitelist diff --git a/src/common/dao/dao_test.go b/src/common/dao/dao_test.go index 5ce5ea7e2..7c04e294f 100644 --- a/src/common/dao/dao_test.go +++ b/src/common/dao/dao_test.go @@ -24,7 +24,7 @@ import ( "github.com/goharbor/harbor/src/common" "github.com/goharbor/harbor/src/common/models" "github.com/goharbor/harbor/src/common/utils" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/stretchr/testify/assert" ) diff --git a/src/common/dao/group/usergroup.go b/src/common/dao/group/usergroup.go index 14884d207..e76248fa5 100644 --- a/src/common/dao/group/usergroup.go +++ b/src/common/dao/group/usergroup.go @@ -22,7 +22,7 @@ import ( "github.com/goharbor/harbor/src/common" "github.com/goharbor/harbor/src/common/dao" "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/pkg/errors" ) diff --git a/src/common/dao/group/usergroup_test.go b/src/common/dao/group/usergroup_test.go index d83dc7148..338939e9a 100644 --- a/src/common/dao/group/usergroup_test.go +++ b/src/common/dao/group/usergroup_test.go @@ -23,7 +23,7 @@ import ( "github.com/goharbor/harbor/src/common/dao" "github.com/goharbor/harbor/src/common/dao/project" "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/stretchr/testify/assert" ) diff --git a/src/common/dao/notification/notification_job.go b/src/common/dao/notification/notification_job.go index 1bd8c5039..65c40f0f5 100755 --- a/src/common/dao/notification/notification_job.go +++ b/src/common/dao/notification/notification_job.go @@ -6,7 +6,7 @@ import ( "github.com/astaxie/beego/orm" "github.com/goharbor/harbor/src/common/dao" "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/pkg/errors" ) diff --git a/src/common/dao/oidc_user.go b/src/common/dao/oidc_user.go index 7367f1b37..f9f411c9b 100644 --- a/src/common/dao/oidc_user.go +++ b/src/common/dao/oidc_user.go @@ -21,7 +21,7 @@ import ( "github.com/astaxie/beego/orm" "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/pkg/errors" ) diff --git a/src/common/dao/pgsql.go b/src/common/dao/pgsql.go index 2e2c8a914..fdff8f975 100644 --- a/src/common/dao/pgsql.go +++ b/src/common/dao/pgsql.go @@ -27,7 +27,7 @@ import ( _ "github.com/golang-migrate/migrate/source/file" // import local file driver for migrator "github.com/goharbor/harbor/src/common/utils" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" _ "github.com/lib/pq" // register pgsql driver ) diff --git a/src/common/dao/project.go b/src/common/dao/project.go index 72f500ebb..55fdf622d 100644 --- a/src/common/dao/project.go +++ b/src/common/dao/project.go @@ -17,7 +17,7 @@ package dao import ( "github.com/goharbor/harbor/src/common" "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "fmt" "time" diff --git a/src/common/dao/project/projectmember.go b/src/common/dao/project/projectmember.go index 081b036f0..6730706fc 100644 --- a/src/common/dao/project/projectmember.go +++ b/src/common/dao/project/projectmember.go @@ -19,7 +19,7 @@ import ( "github.com/goharbor/harbor/src/common/dao" "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" ) // GetProjectMember gets all members of the project. diff --git a/src/common/dao/project/projectmember_test.go b/src/common/dao/project/projectmember_test.go index fadb598b2..909ddb632 100644 --- a/src/common/dao/project/projectmember_test.go +++ b/src/common/dao/project/projectmember_test.go @@ -22,10 +22,10 @@ import ( "github.com/goharbor/harbor/src/common" "github.com/goharbor/harbor/src/common/dao" "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" _ "github.com/goharbor/harbor/src/core/auth/db" _ "github.com/goharbor/harbor/src/core/auth/ldap" cfg "github.com/goharbor/harbor/src/core/config" + "github.com/goharbor/harbor/src/lib/log" ) func TestMain(m *testing.M) { diff --git a/src/common/dao/quota.go b/src/common/dao/quota.go index 31449b624..31faa8723 100644 --- a/src/common/dao/quota.go +++ b/src/common/dao/quota.go @@ -23,7 +23,7 @@ import ( "github.com/astaxie/beego/orm" "github.com/goharbor/harbor/src/common/models" "github.com/goharbor/harbor/src/common/quota/driver" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/types" ) diff --git a/src/common/dao/testutils.go b/src/common/dao/testutils.go index 910d5af72..f269c65f1 100644 --- a/src/common/dao/testutils.go +++ b/src/common/dao/testutils.go @@ -20,7 +20,7 @@ import ( "strconv" "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" ) var defaultRegistered = false diff --git a/src/common/dao/user.go b/src/common/dao/user.go index 639a7d036..732c8a1bd 100644 --- a/src/common/dao/user.go +++ b/src/common/dao/user.go @@ -23,7 +23,7 @@ import ( "github.com/goharbor/harbor/src/common/models" "github.com/goharbor/harbor/src/common/utils" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" ) // GetUser ... diff --git a/src/common/quota/manager.go b/src/common/quota/manager.go index 308b21479..be180abe6 100644 --- a/src/common/quota/manager.go +++ b/src/common/quota/manager.go @@ -22,7 +22,7 @@ import ( "github.com/goharbor/harbor/src/common/dao" "github.com/goharbor/harbor/src/common/models" "github.com/goharbor/harbor/src/common/quota/driver" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/types" ) diff --git a/src/common/rbac/project_evaluator.go b/src/common/rbac/project_evaluator.go index 9ab489d4c..85e4ed1dd 100644 --- a/src/common/rbac/project_evaluator.go +++ b/src/common/rbac/project_evaluator.go @@ -16,8 +16,8 @@ package rbac import ( "github.com/goharbor/harbor/src/common/security" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/promgr" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/permission/evaluator" "github.com/goharbor/harbor/src/pkg/permission/evaluator/namespace" "github.com/goharbor/harbor/src/pkg/permission/evaluator/rbac" diff --git a/src/common/registryctl/client.go b/src/common/registryctl/client.go index ed3ac78b2..8cbef807a 100644 --- a/src/common/registryctl/client.go +++ b/src/common/registryctl/client.go @@ -18,7 +18,7 @@ import ( "os" "github.com/goharbor/harbor/src/common" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/registryctl/client" ) diff --git a/src/common/security/local/context.go b/src/common/security/local/context.go index d85133051..be9dab5cb 100644 --- a/src/common/security/local/context.go +++ b/src/common/security/local/context.go @@ -21,8 +21,8 @@ import ( "github.com/goharbor/harbor/src/common/dao" "github.com/goharbor/harbor/src/common/models" "github.com/goharbor/harbor/src/common/rbac" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/promgr" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/permission/evaluator" "github.com/goharbor/harbor/src/pkg/permission/evaluator/admin" "github.com/goharbor/harbor/src/pkg/permission/types" diff --git a/src/common/security/local/context_test.go b/src/common/security/local/context_test.go index 538c22163..5af896c17 100644 --- a/src/common/security/local/context_test.go +++ b/src/common/security/local/context_test.go @@ -24,10 +24,10 @@ import ( "github.com/goharbor/harbor/src/common/dao/project" "github.com/goharbor/harbor/src/common/models" "github.com/goharbor/harbor/src/common/rbac" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/test" "github.com/goharbor/harbor/src/core/promgr" "github.com/goharbor/harbor/src/core/promgr/pmsdriver/local" + "github.com/goharbor/harbor/src/lib/log" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/src/common/security/robot/context_test.go b/src/common/security/robot/context_test.go index c31c140ae..d225a4f23 100644 --- a/src/common/security/robot/context_test.go +++ b/src/common/security/robot/context_test.go @@ -22,10 +22,10 @@ import ( "github.com/goharbor/harbor/src/common/dao" "github.com/goharbor/harbor/src/common/models" "github.com/goharbor/harbor/src/common/rbac" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/test" "github.com/goharbor/harbor/src/core/promgr" "github.com/goharbor/harbor/src/core/promgr/pmsdriver/local" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/permission/types" "github.com/goharbor/harbor/src/pkg/robot/model" "github.com/stretchr/testify/assert" diff --git a/src/common/security/secret/context.go b/src/common/security/secret/context.go index 378ef8e00..41b65eaf1 100644 --- a/src/common/security/secret/context.go +++ b/src/common/security/secret/context.go @@ -20,7 +20,7 @@ import ( "github.com/goharbor/harbor/src/common" "github.com/goharbor/harbor/src/common/models" "github.com/goharbor/harbor/src/common/secret" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/permission/types" ) diff --git a/src/common/utils/email/mail.go b/src/common/utils/email/mail.go index 64a54dc70..a882bc78c 100644 --- a/src/common/utils/email/mail.go +++ b/src/common/utils/email/mail.go @@ -22,7 +22,7 @@ import ( "strings" "time" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" ) // Send ... diff --git a/src/common/utils/ldap/ldap.go b/src/common/utils/ldap/ldap.go index 8773a3bd4..f54b566d5 100644 --- a/src/common/utils/ldap/ldap.go +++ b/src/common/utils/ldap/ldap.go @@ -24,8 +24,8 @@ import ( "time" "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/config" + "github.com/goharbor/harbor/src/lib/log" goldap "gopkg.in/ldap.v2" ) diff --git a/src/common/utils/ldap/ldap_test.go b/src/common/utils/ldap/ldap_test.go index 4eb21bb8e..58739f10c 100644 --- a/src/common/utils/ldap/ldap_test.go +++ b/src/common/utils/ldap/ldap_test.go @@ -7,9 +7,9 @@ import ( "github.com/goharbor/harbor/src/common" "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/test" uiConfig "github.com/goharbor/harbor/src/core/config" + "github.com/goharbor/harbor/src/lib/log" goldap "gopkg.in/ldap.v2" ) diff --git a/src/common/utils/oidc/helper.go b/src/common/utils/oidc/helper.go index 9eefbf0c9..5a9a1f416 100644 --- a/src/common/utils/oidc/helper.go +++ b/src/common/utils/oidc/helper.go @@ -21,8 +21,8 @@ import ( "fmt" gooidc "github.com/coreos/go-oidc" "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/config" + "github.com/goharbor/harbor/src/lib/log" "golang.org/x/oauth2" "net/http" "strings" diff --git a/src/common/utils/oidc/secret.go b/src/common/utils/oidc/secret.go index 7c5d46cf3..67d49c48e 100644 --- a/src/common/utils/oidc/secret.go +++ b/src/common/utils/oidc/secret.go @@ -9,8 +9,8 @@ import ( "github.com/goharbor/harbor/src/common/dao/group" "github.com/goharbor/harbor/src/common/models" "github.com/goharbor/harbor/src/common/utils" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/config" + "github.com/goharbor/harbor/src/lib/log" "github.com/pkg/errors" "sync" ) diff --git a/src/common/utils/passports.go b/src/common/utils/passports.go index bce88be9e..69fe92e4f 100644 --- a/src/common/utils/passports.go +++ b/src/common/utils/passports.go @@ -4,7 +4,7 @@ import ( "context" "sync" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" ) // PassportsPool holds a given number of passports, they can be applied or be revoked. PassportsPool diff --git a/src/common/utils/redis/helper.go b/src/common/utils/redis/helper.go index 5a137acdd..3e90bb5b4 100644 --- a/src/common/utils/redis/helper.go +++ b/src/common/utils/redis/helper.go @@ -24,8 +24,8 @@ import ( "github.com/garyburd/redigo/redis" "github.com/goharbor/harbor/src/common/utils" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/config" + "github.com/goharbor/harbor/src/lib/log" ) var ( diff --git a/src/common/utils/test/database.go b/src/common/utils/test/database.go index a5845c1d8..5dd0a5421 100644 --- a/src/common/utils/test/database.go +++ b/src/common/utils/test/database.go @@ -22,7 +22,7 @@ import ( "github.com/goharbor/harbor/src/common/dao" "github.com/goharbor/harbor/src/common/models" "github.com/goharbor/harbor/src/common/utils" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" ) // InitDatabaseFromEnv is used to initialize database for testing diff --git a/src/common/utils/uaa/client.go b/src/common/utils/uaa/client.go index d4b4c5dcd..d67fda366 100644 --- a/src/common/utils/uaa/client.go +++ b/src/common/utils/uaa/client.go @@ -25,7 +25,7 @@ import ( "os" "strings" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "golang.org/x/oauth2" "golang.org/x/oauth2/clientcredentials" ) diff --git a/src/common/utils/utils.go b/src/common/utils/utils.go index 18c16ffea..9faecceeb 100644 --- a/src/common/utils/utils.go +++ b/src/common/utils/utils.go @@ -27,7 +27,7 @@ import ( "strings" "time" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" ) // ParseEndpoint parses endpoint to a URL diff --git a/src/controller/artifact/controller.go b/src/controller/artifact/controller.go index cd03a0673..155c3be14 100644 --- a/src/controller/artifact/controller.go +++ b/src/controller/artifact/controller.go @@ -29,12 +29,12 @@ import ( // register CNAB resolver _ "github.com/goharbor/harbor/src/controller/artifact/processor/cnab" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/controller/artifact/processor" "github.com/goharbor/harbor/src/controller/event/metadata" "github.com/goharbor/harbor/src/controller/tag" "github.com/goharbor/harbor/src/lib" "github.com/goharbor/harbor/src/lib/errors" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/lib/orm" "github.com/goharbor/harbor/src/lib/q" "github.com/goharbor/harbor/src/pkg/artifact" diff --git a/src/controller/artifact/processor/chart/chart.go b/src/controller/artifact/processor/chart/chart.go index 2bf45e59b..6417829dd 100644 --- a/src/controller/artifact/processor/chart/chart.go +++ b/src/controller/artifact/processor/chart/chart.go @@ -19,10 +19,10 @@ import ( "encoding/json" "io/ioutil" - "github.com/goharbor/harbor/src/common/utils/log" ps "github.com/goharbor/harbor/src/controller/artifact/processor" "github.com/goharbor/harbor/src/controller/artifact/processor/base" "github.com/goharbor/harbor/src/lib/errors" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/artifact" "github.com/goharbor/harbor/src/pkg/chart" v1 "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/src/controller/artifact/processor/cnab/cnab.go b/src/controller/artifact/processor/cnab/cnab.go index 66e25a5be..b335cbcb4 100644 --- a/src/controller/artifact/processor/cnab/cnab.go +++ b/src/controller/artifact/processor/cnab/cnab.go @@ -17,9 +17,9 @@ package cnab import ( "context" - "github.com/goharbor/harbor/src/common/utils/log" ps "github.com/goharbor/harbor/src/controller/artifact/processor" "github.com/goharbor/harbor/src/controller/artifact/processor/base" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/artifact" ) diff --git a/src/controller/artifact/processor/image/index.go b/src/controller/artifact/processor/image/index.go index bda1bc6e9..7680f8750 100644 --- a/src/controller/artifact/processor/image/index.go +++ b/src/controller/artifact/processor/image/index.go @@ -16,9 +16,9 @@ package image import ( "github.com/docker/distribution/manifest/manifestlist" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/controller/artifact/processor" "github.com/goharbor/harbor/src/controller/artifact/processor/base" + "github.com/goharbor/harbor/src/lib/log" v1 "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/src/controller/artifact/processor/image/manifest_v1.go b/src/controller/artifact/processor/image/manifest_v1.go index 4d8b95eaa..2936e9ff5 100644 --- a/src/controller/artifact/processor/image/manifest_v1.go +++ b/src/controller/artifact/processor/image/manifest_v1.go @@ -18,9 +18,9 @@ import ( "context" "encoding/json" "github.com/docker/distribution/manifest/schema1" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/controller/artifact/processor" "github.com/goharbor/harbor/src/lib/errors" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/artifact" ) diff --git a/src/controller/artifact/processor/image/manifest_v2.go b/src/controller/artifact/processor/image/manifest_v2.go index 6d9917067..66f9bbd21 100644 --- a/src/controller/artifact/processor/image/manifest_v2.go +++ b/src/controller/artifact/processor/image/manifest_v2.go @@ -18,10 +18,10 @@ import ( "context" "encoding/json" "github.com/docker/distribution/manifest/schema2" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/controller/artifact/processor" "github.com/goharbor/harbor/src/controller/artifact/processor/base" "github.com/goharbor/harbor/src/lib/errors" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/artifact" "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/src/controller/artifact/processor/processor.go b/src/controller/artifact/processor/processor.go index d67f12bdb..6d504d8d5 100644 --- a/src/controller/artifact/processor/processor.go +++ b/src/controller/artifact/processor/processor.go @@ -17,7 +17,7 @@ package processor import ( "context" "fmt" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/artifact" ) diff --git a/src/controller/blob/controller.go b/src/controller/blob/controller.go index 9dc081732..2cd4e6b37 100644 --- a/src/controller/blob/controller.go +++ b/src/controller/blob/controller.go @@ -21,9 +21,9 @@ import ( "github.com/docker/distribution" "github.com/garyburd/redigo/redis" "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" util "github.com/goharbor/harbor/src/common/utils/redis" "github.com/goharbor/harbor/src/lib/errors" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/lib/orm" "github.com/goharbor/harbor/src/pkg/blob" ) diff --git a/src/controller/event/handler/auditlog/auditlog.go b/src/controller/event/handler/auditlog/auditlog.go index 853d5d43d..f94890d5d 100644 --- a/src/controller/event/handler/auditlog/auditlog.go +++ b/src/controller/event/handler/auditlog/auditlog.go @@ -17,8 +17,8 @@ package auditlog import ( "context" beegorm "github.com/astaxie/beego/orm" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/controller/event" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/lib/orm" "github.com/goharbor/harbor/src/pkg/audit" am "github.com/goharbor/harbor/src/pkg/audit/model" diff --git a/src/controller/event/handler/internal/artifact.go b/src/controller/event/handler/internal/artifact.go index 1fa227f3a..b144f8b0a 100644 --- a/src/controller/event/handler/internal/artifact.go +++ b/src/controller/event/handler/internal/artifact.go @@ -17,11 +17,11 @@ package internal import ( "context" beegorm "github.com/astaxie/beego/orm" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/controller/artifact" "github.com/goharbor/harbor/src/controller/event" "github.com/goharbor/harbor/src/controller/repository" "github.com/goharbor/harbor/src/controller/tag" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/lib/orm" "github.com/goharbor/harbor/src/lib/q" "time" diff --git a/src/controller/event/handler/replication/replication.go b/src/controller/event/handler/replication/replication.go index 8b65a65df..a86801014 100644 --- a/src/controller/event/handler/replication/replication.go +++ b/src/controller/event/handler/replication/replication.go @@ -15,8 +15,8 @@ package replication import ( - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/controller/event" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/project" "github.com/goharbor/harbor/src/replication" repevent "github.com/goharbor/harbor/src/replication/event" diff --git a/src/controller/event/handler/util/util.go b/src/controller/event/handler/util/util.go index 1adc47dc6..56c521271 100644 --- a/src/controller/event/handler/util/util.go +++ b/src/controller/event/handler/util/util.go @@ -4,8 +4,8 @@ import ( "errors" "fmt" "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/config" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/notifier/event" notifyModel "github.com/goharbor/harbor/src/pkg/notifier/model" "strings" diff --git a/src/controller/event/handler/webhook/artifact/artifact.go b/src/controller/event/handler/webhook/artifact/artifact.go index 466f24f45..13a8db4bb 100644 --- a/src/controller/event/handler/webhook/artifact/artifact.go +++ b/src/controller/event/handler/webhook/artifact/artifact.go @@ -19,9 +19,9 @@ import ( "fmt" beegorm "github.com/astaxie/beego/orm" "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/controller/event" "github.com/goharbor/harbor/src/controller/event/handler/util" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/lib/orm" "github.com/goharbor/harbor/src/pkg/notification" "github.com/goharbor/harbor/src/pkg/notifier/model" diff --git a/src/controller/event/handler/webhook/artifact/replication.go b/src/controller/event/handler/webhook/artifact/replication.go index c3bf5d670..b7c1f809f 100644 --- a/src/controller/event/handler/webhook/artifact/replication.go +++ b/src/controller/event/handler/webhook/artifact/replication.go @@ -6,11 +6,11 @@ import ( "strings" commonModels "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/controller/event" "github.com/goharbor/harbor/src/controller/event/handler/util" "github.com/goharbor/harbor/src/core/config" "github.com/goharbor/harbor/src/jobservice/job" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/notification" "github.com/goharbor/harbor/src/pkg/notifier/model" notifyModel "github.com/goharbor/harbor/src/pkg/notifier/model" diff --git a/src/controller/event/handler/webhook/chart/chart.go b/src/controller/event/handler/webhook/chart/chart.go index 91c279a58..c69f0e78c 100644 --- a/src/controller/event/handler/webhook/chart/chart.go +++ b/src/controller/event/handler/webhook/chart/chart.go @@ -18,10 +18,10 @@ import ( "errors" "fmt" "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/controller/event" "github.com/goharbor/harbor/src/controller/event/handler/util" "github.com/goharbor/harbor/src/core/config" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/notification" "github.com/goharbor/harbor/src/pkg/notifier/model" "github.com/goharbor/harbor/src/pkg/project" diff --git a/src/controller/event/handler/webhook/quota/quota.go b/src/controller/event/handler/webhook/quota/quota.go index 1da58d82f..ad8f7b87f 100644 --- a/src/controller/event/handler/webhook/quota/quota.go +++ b/src/controller/event/handler/webhook/quota/quota.go @@ -18,9 +18,9 @@ import ( "errors" "fmt" "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/controller/event" "github.com/goharbor/harbor/src/controller/event/handler/util" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/notification" "github.com/goharbor/harbor/src/pkg/notifier/model" notifyModel "github.com/goharbor/harbor/src/pkg/notifier/model" diff --git a/src/controller/event/handler/webhook/scan/delete.go b/src/controller/event/handler/webhook/scan/delete.go index cab0c06f2..672a77274 100644 --- a/src/controller/event/handler/webhook/scan/delete.go +++ b/src/controller/event/handler/webhook/scan/delete.go @@ -17,10 +17,10 @@ package scan import ( "context" bo "github.com/astaxie/beego/orm" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/controller/artifact" "github.com/goharbor/harbor/src/controller/event" "github.com/goharbor/harbor/src/controller/scan" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/lib/orm" "github.com/goharbor/harbor/src/lib/q" "github.com/pkg/errors" diff --git a/src/controller/event/handler/webhook/scan/scan.go b/src/controller/event/handler/webhook/scan/scan.go index 613f6a27e..94aeca8f6 100644 --- a/src/controller/event/handler/webhook/scan/scan.go +++ b/src/controller/event/handler/webhook/scan/scan.go @@ -25,8 +25,8 @@ import ( "time" "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/controller/scan" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/notification" "github.com/goharbor/harbor/src/pkg/project" v1 "github.com/goharbor/harbor/src/pkg/scan/rest/v1" diff --git a/src/controller/project/controller.go b/src/controller/project/controller.go index 2024612d2..cd9475cc1 100644 --- a/src/controller/project/controller.go +++ b/src/controller/project/controller.go @@ -18,9 +18,9 @@ import ( "context" "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/promgr/metamgr" "github.com/goharbor/harbor/src/lib/errors" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/project" "github.com/goharbor/harbor/src/pkg/scan/whitelist" ) diff --git a/src/controller/quota/controller.go b/src/controller/quota/controller.go index 921ace8b6..a38c67c51 100644 --- a/src/controller/quota/controller.go +++ b/src/controller/quota/controller.go @@ -20,9 +20,9 @@ import ( "time" "github.com/garyburd/redigo/redis" - "github.com/goharbor/harbor/src/common/utils/log" util "github.com/goharbor/harbor/src/common/utils/redis" "github.com/goharbor/harbor/src/lib/errors" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/lib/orm" "github.com/goharbor/harbor/src/pkg/quota" "github.com/goharbor/harbor/src/pkg/quota/driver" diff --git a/src/controller/quota/driver/project/project.go b/src/controller/quota/driver/project/project.go index aaecbe269..eab6a824c 100644 --- a/src/controller/quota/driver/project/project.go +++ b/src/controller/quota/driver/project/project.go @@ -22,10 +22,10 @@ import ( "github.com/goharbor/harbor/src/common" "github.com/goharbor/harbor/src/common/config" "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/controller/artifact" "github.com/goharbor/harbor/src/controller/blob" "github.com/goharbor/harbor/src/controller/chartmuseum" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/lib/q" dr "github.com/goharbor/harbor/src/pkg/quota/driver" "github.com/goharbor/harbor/src/pkg/types" diff --git a/src/controller/quota/util.go b/src/controller/quota/util.go index 665d7a5ab..6ddd22f4f 100644 --- a/src/controller/quota/util.go +++ b/src/controller/quota/util.go @@ -20,9 +20,9 @@ import ( "strconv" "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/controller/project" "github.com/goharbor/harbor/src/lib/errors" + "github.com/goharbor/harbor/src/lib/log" ) const ( diff --git a/src/controller/repository/controller.go b/src/controller/repository/controller.go index d85a39a6a..dfac08063 100644 --- a/src/controller/repository/controller.go +++ b/src/controller/repository/controller.go @@ -19,9 +19,9 @@ import ( "github.com/goharbor/harbor/src/common/models" "github.com/goharbor/harbor/src/common/utils" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/controller/artifact" "github.com/goharbor/harbor/src/lib/errors" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/lib/orm" "github.com/goharbor/harbor/src/lib/q" art "github.com/goharbor/harbor/src/pkg/artifact" diff --git a/src/controller/scan/all_handler.go b/src/controller/scan/all_handler.go index ec728b30a..b517b61e6 100644 --- a/src/controller/scan/all_handler.go +++ b/src/controller/scan/all_handler.go @@ -18,9 +18,9 @@ import ( "context" "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/controller/artifact" "github.com/goharbor/harbor/src/controller/repository" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/lib/q" "github.com/pkg/errors" ) diff --git a/src/controller/scan/base_controller.go b/src/controller/scan/base_controller.go index 9b613b764..05d02fe5f 100644 --- a/src/controller/scan/base_controller.go +++ b/src/controller/scan/base_controller.go @@ -23,13 +23,13 @@ import ( cj "github.com/goharbor/harbor/src/common/job" jm "github.com/goharbor/harbor/src/common/job/models" "github.com/goharbor/harbor/src/common/rbac" - "github.com/goharbor/harbor/src/common/utils/log" ar "github.com/goharbor/harbor/src/controller/artifact" sc "github.com/goharbor/harbor/src/controller/scanner" "github.com/goharbor/harbor/src/core/config" "github.com/goharbor/harbor/src/jobservice/job" "github.com/goharbor/harbor/src/jobservice/logger" "github.com/goharbor/harbor/src/lib/errors" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/permission/types" "github.com/goharbor/harbor/src/pkg/robot" "github.com/goharbor/harbor/src/pkg/robot/model" diff --git a/src/controller/scanner/base_controller.go b/src/controller/scanner/base_controller.go index 1c2f87bfb..f20d23ae8 100644 --- a/src/controller/scanner/base_controller.go +++ b/src/controller/scanner/base_controller.go @@ -15,9 +15,9 @@ package scanner import ( - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/promgr/metamgr" "github.com/goharbor/harbor/src/jobservice/logger" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/lib/q" "github.com/goharbor/harbor/src/pkg/scan/dao/scanner" v1 "github.com/goharbor/harbor/src/pkg/scan/rest/v1" diff --git a/src/controller/tag/controller.go b/src/controller/tag/controller.go index 6cf3db13e..0c15fedbe 100644 --- a/src/controller/tag/controller.go +++ b/src/controller/tag/controller.go @@ -17,8 +17,8 @@ package tag import ( "context" "github.com/goharbor/harbor/src/common/utils" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/lib/errors" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/lib/orm" "github.com/goharbor/harbor/src/lib/q" "github.com/goharbor/harbor/src/lib/selector" diff --git a/src/core/api/admin_job.go b/src/core/api/admin_job.go index 8fc9671cb..991d427ff 100644 --- a/src/core/api/admin_job.go +++ b/src/core/api/admin_job.go @@ -25,10 +25,10 @@ import ( common_http "github.com/goharbor/harbor/src/common/http" common_job "github.com/goharbor/harbor/src/common/job" common_models "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/controller/scan" "github.com/goharbor/harbor/src/core/api/models" utils_core "github.com/goharbor/harbor/src/core/utils" + "github.com/goharbor/harbor/src/lib/log" "github.com/pkg/errors" ) diff --git a/src/core/api/base.go b/src/core/api/base.go index 8d3d02672..90c4961dc 100644 --- a/src/core/api/base.go +++ b/src/core/api/base.go @@ -25,10 +25,10 @@ import ( "github.com/goharbor/harbor/src/common/rbac" "github.com/goharbor/harbor/src/common/security" "github.com/goharbor/harbor/src/common/utils" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/config" "github.com/goharbor/harbor/src/core/promgr" "github.com/goharbor/harbor/src/lib/errors" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/project" "github.com/goharbor/harbor/src/pkg/repository" "github.com/goharbor/harbor/src/pkg/retention" diff --git a/src/core/api/chart_repository.go b/src/core/api/chart_repository.go index fb6467d19..3e2e9dba5 100755 --- a/src/core/api/chart_repository.go +++ b/src/core/api/chart_repository.go @@ -21,9 +21,9 @@ import ( "github.com/goharbor/harbor/src/chartserver" "github.com/goharbor/harbor/src/common" "github.com/goharbor/harbor/src/common/rbac" - hlog "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/config" "github.com/goharbor/harbor/src/core/label" + hlog "github.com/goharbor/harbor/src/lib/log" n_event "github.com/goharbor/harbor/src/pkg/notifier/event" rep_event "github.com/goharbor/harbor/src/replication/event" "github.com/goharbor/harbor/src/replication/model" diff --git a/src/core/api/config.go b/src/core/api/config.go index d44565040..f5451ade8 100644 --- a/src/core/api/config.go +++ b/src/core/api/config.go @@ -24,9 +24,9 @@ import ( "github.com/goharbor/harbor/src/common/config/metadata" "github.com/goharbor/harbor/src/common/dao" "github.com/goharbor/harbor/src/common/security" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/api/models" corecfg "github.com/goharbor/harbor/src/core/config" + "github.com/goharbor/harbor/src/lib/log" ) // ConfigAPI ... diff --git a/src/core/api/email.go b/src/core/api/email.go index 9d21c428b..9f9909137 100644 --- a/src/core/api/email.go +++ b/src/core/api/email.go @@ -20,8 +20,8 @@ import ( "strconv" "github.com/goharbor/harbor/src/common/utils/email" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/config" + "github.com/goharbor/harbor/src/lib/log" ) const ( diff --git a/src/core/api/health.go b/src/core/api/health.go index 6188aa285..073c351e7 100644 --- a/src/core/api/health.go +++ b/src/core/api/health.go @@ -26,8 +26,8 @@ import ( "github.com/goharbor/harbor/src/common/dao" httputil "github.com/goharbor/harbor/src/common/http" "github.com/goharbor/harbor/src/common/utils" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/config" + "github.com/goharbor/harbor/src/lib/log" "github.com/gomodule/redigo/redis" ) diff --git a/src/core/api/internal.go b/src/core/api/internal.go index 39f0ad216..4b0efe13b 100644 --- a/src/core/api/internal.go +++ b/src/core/api/internal.go @@ -21,10 +21,10 @@ import ( "github.com/goharbor/harbor/src/common" "github.com/goharbor/harbor/src/common/dao" "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/controller/quota" "github.com/goharbor/harbor/src/core/config" "github.com/goharbor/harbor/src/lib/errors" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/lib/orm" ) diff --git a/src/core/api/ldap.go b/src/core/api/ldap.go index 1f0a84bdc..1c46f455b 100644 --- a/src/core/api/ldap.go +++ b/src/core/api/ldap.go @@ -19,8 +19,8 @@ import ( "github.com/goharbor/harbor/src/common/models" ldapUtils "github.com/goharbor/harbor/src/common/utils/ldap" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/auth" + "github.com/goharbor/harbor/src/lib/log" "errors" "strings" diff --git a/src/core/api/metadata.go b/src/core/api/metadata.go index 490e5be74..a3d6fa68b 100644 --- a/src/core/api/metadata.go +++ b/src/core/api/metadata.go @@ -24,8 +24,8 @@ import ( "github.com/goharbor/harbor/src/common/models" "github.com/goharbor/harbor/src/common/rbac" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/promgr/metamgr" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/scan/vuln" ) diff --git a/src/core/api/models/admin_job.go b/src/core/api/models/admin_job.go index 5bdf40efc..62e69926a 100644 --- a/src/core/api/models/admin_job.go +++ b/src/core/api/models/admin_job.go @@ -25,8 +25,8 @@ import ( "github.com/goharbor/harbor/src/common/job/models" common_models "github.com/goharbor/harbor/src/common/models" common_utils "github.com/goharbor/harbor/src/common/utils" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/config" + "github.com/goharbor/harbor/src/lib/log" "github.com/robfig/cron" ) diff --git a/src/core/api/notification_policy.go b/src/core/api/notification_policy.go index 1510f10ad..92b2f6e1e 100755 --- a/src/core/api/notification_policy.go +++ b/src/core/api/notification_policy.go @@ -10,8 +10,8 @@ import ( "github.com/goharbor/harbor/src/common/models" "github.com/goharbor/harbor/src/common/rbac" "github.com/goharbor/harbor/src/common/utils" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/controller/event" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/notification" ) diff --git a/src/core/api/oidc.go b/src/core/api/oidc.go index c19ede0a5..59378d549 100644 --- a/src/core/api/oidc.go +++ b/src/core/api/oidc.go @@ -17,8 +17,8 @@ package api import ( "errors" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/oidc" + "github.com/goharbor/harbor/src/lib/log" ) // OIDCAPI handles the requests to /api/system/oidc/xxx diff --git a/src/core/api/project.go b/src/core/api/project.go index 44c80b34a..d9220b323 100644 --- a/src/core/api/project.go +++ b/src/core/api/project.go @@ -30,9 +30,9 @@ import ( "github.com/goharbor/harbor/src/common/rbac" "github.com/goharbor/harbor/src/common/utils" errutil "github.com/goharbor/harbor/src/common/utils/error" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/controller/event/metadata" "github.com/goharbor/harbor/src/core/config" + "github.com/goharbor/harbor/src/lib/log" evt "github.com/goharbor/harbor/src/pkg/notifier/event" "github.com/goharbor/harbor/src/pkg/scan/vuln" "github.com/goharbor/harbor/src/pkg/types" diff --git a/src/core/api/registry.go b/src/core/api/registry.go index 2af9ebb7a..e55da244a 100644 --- a/src/core/api/registry.go +++ b/src/core/api/registry.go @@ -8,8 +8,8 @@ import ( common_http "github.com/goharbor/harbor/src/common/http" "github.com/goharbor/harbor/src/common/utils" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/api/models" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/replication" "github.com/goharbor/harbor/src/replication/adapter" "github.com/goharbor/harbor/src/replication/event" diff --git a/src/core/api/search.go b/src/core/api/search.go index 041b68aac..db8655851 100644 --- a/src/core/api/search.go +++ b/src/core/api/search.go @@ -21,9 +21,9 @@ import ( "github.com/goharbor/harbor/src/common/dao" "github.com/goharbor/harbor/src/common/models" "github.com/goharbor/harbor/src/common/utils" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/controller/artifact" "github.com/goharbor/harbor/src/core/config" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/lib/orm" "github.com/goharbor/harbor/src/lib/q" "k8s.io/helm/cmd/helm/search" diff --git a/src/core/api/statistic.go b/src/core/api/statistic.go index 4019f0326..4c2aedff5 100644 --- a/src/core/api/statistic.go +++ b/src/core/api/statistic.go @@ -20,7 +20,7 @@ import ( "github.com/goharbor/harbor/src/common/dao" "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" ) const ( diff --git a/src/core/api/sys_cve_whitelist.go b/src/core/api/sys_cve_whitelist.go index 921abb83f..50882bb96 100644 --- a/src/core/api/sys_cve_whitelist.go +++ b/src/core/api/sys_cve_whitelist.go @@ -18,7 +18,7 @@ import ( "errors" "fmt" "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/scan/whitelist" "net/http" ) diff --git a/src/core/api/systeminfo.go b/src/core/api/systeminfo.go index 8da90ec31..9825a9ef7 100644 --- a/src/core/api/systeminfo.go +++ b/src/core/api/systeminfo.go @@ -24,10 +24,10 @@ import ( "github.com/goharbor/harbor/src/common" "github.com/goharbor/harbor/src/common/models" "github.com/goharbor/harbor/src/common/utils" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/config" "github.com/goharbor/harbor/src/core/systeminfo" "github.com/goharbor/harbor/src/core/systeminfo/imagestorage" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/version" ) diff --git a/src/core/api/user.go b/src/core/api/user.go index 8cbcf2de4..3a99f1a66 100644 --- a/src/core/api/user.go +++ b/src/core/api/user.go @@ -27,9 +27,9 @@ import ( "github.com/goharbor/harbor/src/common/rbac" "github.com/goharbor/harbor/src/common/security/local" "github.com/goharbor/harbor/src/common/utils" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/config" "github.com/goharbor/harbor/src/lib" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/permission/types" ) diff --git a/src/core/api/usergroup.go b/src/core/api/usergroup.go index 3bfd2d34e..5086c552d 100644 --- a/src/core/api/usergroup.go +++ b/src/core/api/usergroup.go @@ -25,9 +25,9 @@ import ( "github.com/goharbor/harbor/src/common/dao/group" "github.com/goharbor/harbor/src/common/models" "github.com/goharbor/harbor/src/common/utils/ldap" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/auth" "github.com/goharbor/harbor/src/core/config" + "github.com/goharbor/harbor/src/lib/log" ) // UserGroupAPI ... diff --git a/src/core/auth/authenticator.go b/src/core/auth/authenticator.go index f883ca7fb..5c83838cf 100644 --- a/src/core/auth/authenticator.go +++ b/src/core/auth/authenticator.go @@ -22,8 +22,8 @@ import ( "github.com/goharbor/harbor/src/common" "github.com/goharbor/harbor/src/common/dao" "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/config" + "github.com/goharbor/harbor/src/lib/log" ) // 1.5 seconds diff --git a/src/core/auth/authproxy/auth.go b/src/core/auth/authproxy/auth.go index bb4fcc7f7..c5fc40209 100644 --- a/src/core/auth/authproxy/auth.go +++ b/src/core/auth/authproxy/auth.go @@ -32,9 +32,9 @@ import ( "github.com/goharbor/harbor/src/common" "github.com/goharbor/harbor/src/common/dao" "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/auth" "github.com/goharbor/harbor/src/core/config" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/authproxy" ) diff --git a/src/core/auth/ldap/ldap.go b/src/core/auth/ldap/ldap.go index 4b24462b5..68797e873 100644 --- a/src/core/auth/ldap/ldap.go +++ b/src/core/auth/ldap/ldap.go @@ -27,9 +27,9 @@ import ( "github.com/goharbor/harbor/src/common/models" ldapUtils "github.com/goharbor/harbor/src/common/utils/ldap" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/auth" "github.com/goharbor/harbor/src/core/config" + "github.com/goharbor/harbor/src/lib/log" ) // Auth implements AuthenticateHelper interface to authenticate against LDAP diff --git a/src/core/auth/ldap/ldap_test.go b/src/core/auth/ldap/ldap_test.go index 6b4242166..3fb141b9d 100644 --- a/src/core/auth/ldap/ldap_test.go +++ b/src/core/auth/ldap/ldap_test.go @@ -24,9 +24,9 @@ import ( "github.com/goharbor/harbor/src/common/dao" "github.com/goharbor/harbor/src/common/dao/project" "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/test" "github.com/goharbor/harbor/src/core/api" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/common/dao/group" "github.com/goharbor/harbor/src/core/auth" diff --git a/src/core/auth/uaa/uaa.go b/src/core/auth/uaa/uaa.go index aedcdbf9e..ebc832fb2 100644 --- a/src/core/auth/uaa/uaa.go +++ b/src/core/auth/uaa/uaa.go @@ -23,10 +23,10 @@ import ( "github.com/goharbor/harbor/src/common" "github.com/goharbor/harbor/src/common/dao" "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/uaa" "github.com/goharbor/harbor/src/core/auth" "github.com/goharbor/harbor/src/core/config" + "github.com/goharbor/harbor/src/lib/log" ) // Auth is the implementation of AuthenticateHelper to access uaa for authentication. diff --git a/src/core/config/config.go b/src/core/config/config.go index bd9a6d02f..8adcd596d 100755 --- a/src/core/config/config.go +++ b/src/core/config/config.go @@ -26,9 +26,9 @@ import ( comcfg "github.com/goharbor/harbor/src/common/config" "github.com/goharbor/harbor/src/common/models" "github.com/goharbor/harbor/src/common/secret" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/promgr" "github.com/goharbor/harbor/src/core/promgr/pmsdriver/local" + "github.com/goharbor/harbor/src/lib/log" ) const ( diff --git a/src/core/controllers/base.go b/src/core/controllers/base.go index 87cc4c136..645f17bf2 100644 --- a/src/core/controllers/base.go +++ b/src/core/controllers/base.go @@ -32,11 +32,11 @@ import ( "github.com/goharbor/harbor/src/common/models" "github.com/goharbor/harbor/src/common/utils" email_util "github.com/goharbor/harbor/src/common/utils/email" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/api" "github.com/goharbor/harbor/src/core/auth" "github.com/goharbor/harbor/src/core/config" "github.com/goharbor/harbor/src/lib" + "github.com/goharbor/harbor/src/lib/log" ) // CommonController handles request from UI that doesn't expect a page, such as /SwitchLanguage /logout ... diff --git a/src/core/controllers/oidc.go b/src/core/controllers/oidc.go index fd4388a4c..bfba5fae2 100644 --- a/src/core/controllers/oidc.go +++ b/src/core/controllers/oidc.go @@ -25,10 +25,10 @@ import ( "github.com/goharbor/harbor/src/common/dao" "github.com/goharbor/harbor/src/common/models" "github.com/goharbor/harbor/src/common/utils" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/oidc" "github.com/goharbor/harbor/src/core/api" "github.com/goharbor/harbor/src/core/config" + "github.com/goharbor/harbor/src/lib/log" "github.com/pkg/errors" ) diff --git a/src/core/main.go b/src/core/main.go index 1402121d5..0489d8f15 100755 --- a/src/core/main.go +++ b/src/core/main.go @@ -29,7 +29,6 @@ import ( "github.com/goharbor/harbor/src/common/job" "github.com/goharbor/harbor/src/common/models" "github.com/goharbor/harbor/src/common/utils" - "github.com/goharbor/harbor/src/common/utils/log" _ "github.com/goharbor/harbor/src/controller/event/handler" "github.com/goharbor/harbor/src/core/api" _ "github.com/goharbor/harbor/src/core/auth/authproxy" @@ -40,6 +39,7 @@ import ( "github.com/goharbor/harbor/src/core/config" "github.com/goharbor/harbor/src/core/middlewares" "github.com/goharbor/harbor/src/core/service/token" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/migration" "github.com/goharbor/harbor/src/pkg/notification" _ "github.com/goharbor/harbor/src/pkg/notifier/topic" diff --git a/src/core/promgr/pmsdriver/local/local.go b/src/core/promgr/pmsdriver/local/local.go index 4706f3f43..d29121942 100644 --- a/src/core/promgr/pmsdriver/local/local.go +++ b/src/core/promgr/pmsdriver/local/local.go @@ -23,8 +23,8 @@ import ( "github.com/goharbor/harbor/src/common/models" "github.com/goharbor/harbor/src/common/utils" errutil "github.com/goharbor/harbor/src/common/utils/error" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/promgr/pmsdriver" + "github.com/goharbor/harbor/src/lib/log" ) const dupProjectPattern = `duplicate key value violates unique constraint \"project_name_key\"` diff --git a/src/core/promgr/promgr.go b/src/core/promgr/promgr.go index 60661e020..07d8b8e86 100644 --- a/src/core/promgr/promgr.go +++ b/src/core/promgr/promgr.go @@ -20,9 +20,9 @@ import ( "strconv" "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/promgr/metamgr" "github.com/goharbor/harbor/src/core/promgr/pmsdriver" + "github.com/goharbor/harbor/src/lib/log" ) // ProjectManager is the project manager which abstracts the operations related diff --git a/src/core/service/notifications/admin/handler.go b/src/core/service/notifications/admin/handler.go index cace3ca95..98304b818 100644 --- a/src/core/service/notifications/admin/handler.go +++ b/src/core/service/notifications/admin/handler.go @@ -23,12 +23,12 @@ import ( "github.com/goharbor/harbor/src/common/job" job_model "github.com/goharbor/harbor/src/common/job/models" "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/controller/quota" "github.com/goharbor/harbor/src/controller/scan" "github.com/goharbor/harbor/src/core/config" "github.com/goharbor/harbor/src/core/service/notifications" j "github.com/goharbor/harbor/src/jobservice/job" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/lib/orm" ) diff --git a/src/core/service/notifications/jobs/handler.go b/src/core/service/notifications/jobs/handler.go index ee9156cf2..178d218cc 100755 --- a/src/core/service/notifications/jobs/handler.go +++ b/src/core/service/notifications/jobs/handler.go @@ -22,10 +22,10 @@ import ( "github.com/goharbor/harbor/src/common/job" "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/controller/event/metadata" "github.com/goharbor/harbor/src/controller/scan" jjob "github.com/goharbor/harbor/src/jobservice/job" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/notification" "github.com/goharbor/harbor/src/pkg/notifier/event" "github.com/goharbor/harbor/src/pkg/retention" diff --git a/src/core/service/notifications/scheduler/handler.go b/src/core/service/notifications/scheduler/handler.go index d3299255b..a153135f1 100644 --- a/src/core/service/notifications/scheduler/handler.go +++ b/src/core/service/notifications/scheduler/handler.go @@ -20,7 +20,7 @@ import ( "github.com/goharbor/harbor/src/core/service/notifications" "github.com/goharbor/harbor/src/common/job/models" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/scheduler" "github.com/goharbor/harbor/src/pkg/scheduler/hook" ) diff --git a/src/core/service/token/authutils.go b/src/core/service/token/authutils.go index d04fe264d..3d9f204c1 100644 --- a/src/core/service/token/authutils.go +++ b/src/core/service/token/authutils.go @@ -27,9 +27,9 @@ import ( "github.com/docker/libtrust" "github.com/goharbor/harbor/src/common/models" "github.com/goharbor/harbor/src/common/security" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/config" "github.com/goharbor/harbor/src/core/promgr" + "github.com/goharbor/harbor/src/lib/log" ) const ( diff --git a/src/core/service/token/creator.go b/src/core/service/token/creator.go index 9897e68d2..de9347ff9 100644 --- a/src/core/service/token/creator.go +++ b/src/core/service/token/creator.go @@ -24,9 +24,9 @@ import ( "github.com/goharbor/harbor/src/common/models" "github.com/goharbor/harbor/src/common/rbac" "github.com/goharbor/harbor/src/common/security" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/config" "github.com/goharbor/harbor/src/core/promgr" + "github.com/goharbor/harbor/src/lib/log" ) var creatorMap map[string]Creator diff --git a/src/core/service/token/token.go b/src/core/service/token/token.go index e378363ee..3cb3d9457 100644 --- a/src/core/service/token/token.go +++ b/src/core/service/token/token.go @@ -19,7 +19,7 @@ import ( "net/http" "github.com/astaxie/beego" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" ) // Handler handles request on /service/token, which is the auth provider for registry. diff --git a/src/core/systeminfo/imagestorage/filesystem/driver.go b/src/core/systeminfo/imagestorage/filesystem/driver.go index b30c1741e..c6ed433d5 100644 --- a/src/core/systeminfo/imagestorage/filesystem/driver.go +++ b/src/core/systeminfo/imagestorage/filesystem/driver.go @@ -19,8 +19,8 @@ import ( "reflect" "syscall" - "github.com/goharbor/harbor/src/common/utils/log" storage "github.com/goharbor/harbor/src/core/systeminfo/imagestorage" + "github.com/goharbor/harbor/src/lib/log" ) const ( diff --git a/src/core/utils/response_handlers.go b/src/core/utils/response_handlers.go index fe95592d9..c358b8ae3 100644 --- a/src/core/utils/response_handlers.go +++ b/src/core/utils/response_handlers.go @@ -21,7 +21,7 @@ import ( "net/http" "github.com/goharbor/harbor/src/common/api" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" ) // ResponseHandler provides utility to handle http response. diff --git a/src/jobservice/config/config.go b/src/jobservice/config/config.go index 4f0b29bf5..c0d3055d1 100644 --- a/src/jobservice/config/config.go +++ b/src/jobservice/config/config.go @@ -23,8 +23,8 @@ import ( "strconv" "strings" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/jobservice/common/utils" + "github.com/goharbor/harbor/src/lib/log" yaml "gopkg.in/yaml.v2" ) diff --git a/src/jobservice/hook/hook_client.go b/src/jobservice/hook/hook_client.go index e7f0a54bf..135e13ac0 100644 --- a/src/jobservice/hook/hook_client.go +++ b/src/jobservice/hook/hook_client.go @@ -26,7 +26,7 @@ import ( "time" commonhttp "github.com/goharbor/harbor/src/common/http" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" ) // Client for handling the hook events diff --git a/src/jobservice/logger/backend/db_logger.go b/src/jobservice/logger/backend/db_logger.go index 6887e4f82..1f4ac05d5 100644 --- a/src/jobservice/logger/backend/db_logger.go +++ b/src/jobservice/logger/backend/db_logger.go @@ -5,7 +5,7 @@ import ( "bytes" "github.com/goharbor/harbor/src/common/dao" "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" ) // DBLogger is an implementation of logger.Interface. diff --git a/src/jobservice/logger/backend/db_logger_test.go b/src/jobservice/logger/backend/db_logger_test.go index 2f6f79dce..fbe000d06 100644 --- a/src/jobservice/logger/backend/db_logger_test.go +++ b/src/jobservice/logger/backend/db_logger_test.go @@ -2,9 +2,9 @@ package backend import ( "github.com/goharbor/harbor/src/common/dao" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/jobservice/logger/getter" "github.com/goharbor/harbor/src/jobservice/logger/sweeper" + "github.com/goharbor/harbor/src/lib/log" "github.com/stretchr/testify/require" "os" "testing" diff --git a/src/jobservice/logger/backend/file_logger.go b/src/jobservice/logger/backend/file_logger.go index 53834ade7..6ec12f7ab 100644 --- a/src/jobservice/logger/backend/file_logger.go +++ b/src/jobservice/logger/backend/file_logger.go @@ -3,7 +3,7 @@ package backend import ( "os" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" ) // FileLogger is an implementation of logger.Interface. diff --git a/src/jobservice/logger/backend/std_logger.go b/src/jobservice/logger/backend/std_logger.go index 0aa53af47..d51cbba20 100644 --- a/src/jobservice/logger/backend/std_logger.go +++ b/src/jobservice/logger/backend/std_logger.go @@ -3,7 +3,7 @@ package backend import ( "os" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" ) const ( diff --git a/src/jobservice/logger/backend/utils.go b/src/jobservice/logger/backend/utils.go index 99c83427d..85ffc3329 100644 --- a/src/jobservice/logger/backend/utils.go +++ b/src/jobservice/logger/backend/utils.go @@ -3,7 +3,7 @@ package backend import ( "strings" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" ) func parseLevel(lvl string) log.Level { diff --git a/src/jobservice/logger/backend/utils_test.go b/src/jobservice/logger/backend/utils_test.go index a4716b33f..b9051c414 100644 --- a/src/jobservice/logger/backend/utils_test.go +++ b/src/jobservice/logger/backend/utils_test.go @@ -3,7 +3,7 @@ package backend import ( "testing" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" ) // Test parseLevel diff --git a/src/jobservice/logger/entry_test.go b/src/jobservice/logger/entry_test.go index 7a0adf5bc..105f3e9a8 100644 --- a/src/jobservice/logger/entry_test.go +++ b/src/jobservice/logger/entry_test.go @@ -2,8 +2,8 @@ package logger import ( "github.com/goharbor/harbor/src/common/dao" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/jobservice/logger/backend" + "github.com/goharbor/harbor/src/lib/log" "github.com/stretchr/testify/require" "os" "path" diff --git a/src/jobservice/logger/getter/db_getter_test.go b/src/jobservice/logger/getter/db_getter_test.go index e4f75fe54..bdd2ad85e 100644 --- a/src/jobservice/logger/getter/db_getter_test.go +++ b/src/jobservice/logger/getter/db_getter_test.go @@ -2,9 +2,9 @@ package getter import ( "github.com/goharbor/harbor/src/common/dao" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/jobservice/logger/backend" "github.com/goharbor/harbor/src/jobservice/logger/sweeper" + "github.com/goharbor/harbor/src/lib/log" "github.com/stretchr/testify/require" "os" "testing" diff --git a/src/jobservice/logger/sweeper/db_sweeper_test.go b/src/jobservice/logger/sweeper/db_sweeper_test.go index 15d8d2e7d..631eed87c 100644 --- a/src/jobservice/logger/sweeper/db_sweeper_test.go +++ b/src/jobservice/logger/sweeper/db_sweeper_test.go @@ -2,8 +2,8 @@ package sweeper import ( "github.com/goharbor/harbor/src/common/dao" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/jobservice/logger/backend" + "github.com/goharbor/harbor/src/lib/log" "github.com/stretchr/testify/require" "os" "testing" diff --git a/src/lib/errors/errors.go b/src/lib/errors/errors.go index 615c3f319..036245cb5 100644 --- a/src/lib/errors/errors.go +++ b/src/lib/errors/errors.go @@ -20,7 +20,7 @@ import ( "fmt" "strings" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" ) var ( diff --git a/src/common/utils/log/context.go b/src/lib/log/context.go similarity index 100% rename from src/common/utils/log/context.go rename to src/lib/log/context.go diff --git a/src/common/utils/log/formatter.go b/src/lib/log/formatter.go similarity index 100% rename from src/common/utils/log/formatter.go rename to src/lib/log/formatter.go diff --git a/src/common/utils/log/level.go b/src/lib/log/level.go similarity index 100% rename from src/common/utils/log/level.go rename to src/lib/log/level.go diff --git a/src/common/utils/log/level_test.go b/src/lib/log/level_test.go similarity index 100% rename from src/common/utils/log/level_test.go rename to src/lib/log/level_test.go diff --git a/src/common/utils/log/logger.go b/src/lib/log/logger.go similarity index 100% rename from src/common/utils/log/logger.go rename to src/lib/log/logger.go diff --git a/src/common/utils/log/logger_test.go b/src/lib/log/logger_test.go similarity index 100% rename from src/common/utils/log/logger_test.go rename to src/lib/log/logger_test.go diff --git a/src/common/utils/log/record.go b/src/lib/log/record.go similarity index 100% rename from src/common/utils/log/record.go rename to src/lib/log/record.go diff --git a/src/common/utils/log/textformatter.go b/src/lib/log/textformatter.go similarity index 100% rename from src/common/utils/log/textformatter.go rename to src/lib/log/textformatter.go diff --git a/src/lib/orm/orm.go b/src/lib/orm/orm.go index 06668fb9c..1c1277258 100644 --- a/src/lib/orm/orm.go +++ b/src/lib/orm/orm.go @@ -18,7 +18,7 @@ import ( "context" "errors" "github.com/astaxie/beego/orm" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" ) type ormKey struct{} diff --git a/src/lib/q/builder.go b/src/lib/q/builder.go index 91ed2dfb7..4a6bbf829 100644 --- a/src/lib/q/builder.go +++ b/src/lib/q/builder.go @@ -16,8 +16,8 @@ package q import ( "fmt" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/lib/errors" + "github.com/goharbor/harbor/src/lib/log" "net/url" "strconv" "strings" diff --git a/src/lib/selector/candidate.go b/src/lib/selector/candidate.go index de5a7e932..40169d901 100644 --- a/src/lib/selector/candidate.go +++ b/src/lib/selector/candidate.go @@ -18,7 +18,7 @@ import ( "encoding/base64" "encoding/json" "fmt" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/pkg/errors" ) diff --git a/src/migration/artifact.go b/src/migration/artifact.go index b51ea3c63..6418b41b9 100644 --- a/src/migration/artifact.go +++ b/src/migration/artifact.go @@ -16,8 +16,8 @@ package migration import ( "context" - "github.com/goharbor/harbor/src/common/utils/log" art "github.com/goharbor/harbor/src/controller/artifact" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/lib/q" "github.com/goharbor/harbor/src/pkg/artifact" "github.com/goharbor/harbor/src/pkg/project" diff --git a/src/migration/migration.go b/src/migration/migration.go index 3d782d9fd..a9f3ece41 100644 --- a/src/migration/migration.go +++ b/src/migration/migration.go @@ -20,7 +20,7 @@ import ( beegorm "github.com/astaxie/beego/orm" "github.com/goharbor/harbor/src/common/dao" "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/lib/orm" "github.com/golang-migrate/migrate" ) diff --git a/src/pkg/artifact/model.go b/src/pkg/artifact/model.go index 6a4f08f2f..d922a0434 100644 --- a/src/pkg/artifact/model.go +++ b/src/pkg/artifact/model.go @@ -19,7 +19,7 @@ import ( "time" "github.com/docker/distribution/manifest/manifestlist" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/artifact/dao" "github.com/goharbor/harbor/src/server/v2.0/models" v1 "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/src/pkg/authproxy/http.go b/src/pkg/authproxy/http.go index 0e13310b0..fd0a5d156 100644 --- a/src/pkg/authproxy/http.go +++ b/src/pkg/authproxy/http.go @@ -6,7 +6,7 @@ import ( "github.com/goharbor/harbor/src/common" "github.com/goharbor/harbor/src/common/dao/group" "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" k8s_api_v1beta1 "k8s.io/api/authentication/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/src/pkg/notification/hook/hook.go b/src/pkg/notification/hook/hook.go index 0f9d6e1e4..7b4cf3057 100755 --- a/src/pkg/notification/hook/hook.go +++ b/src/pkg/notification/hook/hook.go @@ -8,9 +8,9 @@ import ( cJob "github.com/goharbor/harbor/src/common/job" "github.com/goharbor/harbor/src/common/job/models" cModels "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/config" "github.com/goharbor/harbor/src/core/utils" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/notification/job" "github.com/goharbor/harbor/src/pkg/notification/job/manager" "github.com/goharbor/harbor/src/pkg/notifier/model" diff --git a/src/pkg/notification/notification.go b/src/pkg/notification/notification.go index de66726c5..b25c4050f 100755 --- a/src/pkg/notification/notification.go +++ b/src/pkg/notification/notification.go @@ -4,7 +4,7 @@ import ( "container/list" "context" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/notification/hook" "github.com/goharbor/harbor/src/pkg/notification/job" jobMgr "github.com/goharbor/harbor/src/pkg/notification/job/manager" diff --git a/src/pkg/notification/policy/manager/manager.go b/src/pkg/notification/policy/manager/manager.go index 95bcb2114..c23b5525b 100755 --- a/src/pkg/notification/policy/manager/manager.go +++ b/src/pkg/notification/policy/manager/manager.go @@ -8,7 +8,7 @@ import ( "github.com/goharbor/harbor/src/common/dao/notification" commonhttp "github.com/goharbor/harbor/src/common/http" "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" ) // DefaultManager ... diff --git a/src/pkg/notifier/event/event.go b/src/pkg/notifier/event/event.go index 04b9e2e94..050d6c1da 100644 --- a/src/pkg/notifier/event/event.go +++ b/src/pkg/notifier/event/event.go @@ -2,7 +2,7 @@ package event import ( "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/notifier" "github.com/goharbor/harbor/src/pkg/notifier/model" "github.com/pkg/errors" diff --git a/src/pkg/notifier/notifier.go b/src/pkg/notifier/notifier.go index 98ef7af4f..79f6931dc 100644 --- a/src/pkg/notifier/notifier.go +++ b/src/pkg/notifier/notifier.go @@ -7,7 +7,7 @@ import ( "strings" "sync" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" ) // HandlerIndexer is setup the relationship between the handler type and diff --git a/src/pkg/notifier/topic/topics.go b/src/pkg/notifier/topic/topics.go index 5b1725d8f..042267433 100644 --- a/src/pkg/notifier/topic/topics.go +++ b/src/pkg/notifier/topic/topics.go @@ -1,7 +1,7 @@ package topic import ( - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/notifier" "github.com/goharbor/harbor/src/pkg/notifier/handler/notification" "github.com/goharbor/harbor/src/pkg/notifier/model" diff --git a/src/pkg/permission/evaluator/admin/admin.go b/src/pkg/permission/evaluator/admin/admin.go index 954fa9b0f..8d4ec1c65 100644 --- a/src/pkg/permission/evaluator/admin/admin.go +++ b/src/pkg/permission/evaluator/admin/admin.go @@ -15,7 +15,7 @@ package admin import ( - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/permission/evaluator" "github.com/goharbor/harbor/src/pkg/permission/types" ) diff --git a/src/pkg/permission/evaluator/rbac/casbin_match.go b/src/pkg/permission/evaluator/rbac/casbin_match.go index 4626ff6b8..c2e20453b 100644 --- a/src/pkg/permission/evaluator/rbac/casbin_match.go +++ b/src/pkg/permission/evaluator/rbac/casbin_match.go @@ -21,7 +21,7 @@ import ( "sync" "time" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" ) type regexpStore struct { diff --git a/src/pkg/registry/auth/bearer/cache.go b/src/pkg/registry/auth/bearer/cache.go index 938de37c5..f1196a2df 100644 --- a/src/pkg/registry/auth/bearer/cache.go +++ b/src/pkg/registry/auth/bearer/cache.go @@ -15,7 +15,7 @@ package bearer import ( - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "strings" "sync" "time" diff --git a/src/pkg/retention/launcher.go b/src/pkg/retention/launcher.go index 0f50c474c..ac9262f77 100644 --- a/src/pkg/retention/launcher.go +++ b/src/pkg/retention/launcher.go @@ -28,8 +28,8 @@ import ( "github.com/goharbor/harbor/src/common/job/models" cmodels "github.com/goharbor/harbor/src/common/models" "github.com/goharbor/harbor/src/common/utils" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/config" + "github.com/goharbor/harbor/src/lib/log" pq "github.com/goharbor/harbor/src/lib/q" "github.com/goharbor/harbor/src/pkg/project" "github.com/goharbor/harbor/src/pkg/repository" diff --git a/src/pkg/retention/policy/action/performer.go b/src/pkg/retention/policy/action/performer.go index edfce24b5..6352bb281 100644 --- a/src/pkg/retention/policy/action/performer.go +++ b/src/pkg/retention/policy/action/performer.go @@ -16,7 +16,7 @@ package action import ( "github.com/goharbor/harbor/src/common/utils" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/lib/selector" "github.com/goharbor/harbor/src/pkg/immutabletag/match/rule" "github.com/goharbor/harbor/src/pkg/retention/dep" diff --git a/src/pkg/retention/policy/alg/or/processor.go b/src/pkg/retention/policy/alg/or/processor.go index a75f71179..a5eb855a0 100644 --- a/src/pkg/retention/policy/alg/or/processor.go +++ b/src/pkg/retention/policy/alg/or/processor.go @@ -18,7 +18,7 @@ import ( "github.com/goharbor/harbor/src/lib/selector" "sync" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/retention/policy/action" "github.com/goharbor/harbor/src/pkg/retention/policy/alg" "github.com/goharbor/harbor/src/pkg/retention/policy/rule" diff --git a/src/pkg/retention/policy/rule/dayspl/evaluator.go b/src/pkg/retention/policy/rule/dayspl/evaluator.go index f63361b72..99434cc02 100644 --- a/src/pkg/retention/policy/rule/dayspl/evaluator.go +++ b/src/pkg/retention/policy/rule/dayspl/evaluator.go @@ -20,7 +20,7 @@ import ( "github.com/goharbor/harbor/src/lib/selector" "time" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/retention/policy/action" "github.com/goharbor/harbor/src/pkg/retention/policy/rule" ) diff --git a/src/pkg/retention/policy/rule/daysps/evaluator.go b/src/pkg/retention/policy/rule/daysps/evaluator.go index ab102c022..4c08849ac 100644 --- a/src/pkg/retention/policy/rule/daysps/evaluator.go +++ b/src/pkg/retention/policy/rule/daysps/evaluator.go @@ -20,7 +20,7 @@ import ( "github.com/goharbor/harbor/src/lib/selector" "time" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/retention/policy/action" "github.com/goharbor/harbor/src/pkg/retention/policy/rule" ) diff --git a/src/pkg/retention/policy/rule/lastx/evaluator.go b/src/pkg/retention/policy/rule/lastx/evaluator.go index 88932d124..e944b248a 100644 --- a/src/pkg/retention/policy/rule/lastx/evaluator.go +++ b/src/pkg/retention/policy/rule/lastx/evaluator.go @@ -19,7 +19,7 @@ import ( "github.com/goharbor/harbor/src/lib/selector" "time" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/retention/policy/action" "github.com/goharbor/harbor/src/pkg/retention/policy/rule" ) diff --git a/src/pkg/retention/policy/rule/latestk/evaluator.go b/src/pkg/retention/policy/rule/latestk/evaluator.go index f2b2c8c76..64a20b943 100644 --- a/src/pkg/retention/policy/rule/latestk/evaluator.go +++ b/src/pkg/retention/policy/rule/latestk/evaluator.go @@ -19,7 +19,7 @@ import ( "github.com/goharbor/harbor/src/lib/selector" "sort" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/retention/policy/action" "github.com/goharbor/harbor/src/pkg/retention/policy/rule" ) diff --git a/src/pkg/retention/policy/rule/latestpl/evaluator.go b/src/pkg/retention/policy/rule/latestpl/evaluator.go index 91030258c..04fa4a2bc 100644 --- a/src/pkg/retention/policy/rule/latestpl/evaluator.go +++ b/src/pkg/retention/policy/rule/latestpl/evaluator.go @@ -21,7 +21,7 @@ import ( "math" "sort" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/retention/policy/action" "github.com/goharbor/harbor/src/pkg/retention/policy/rule" ) diff --git a/src/pkg/retention/policy/rule/latestps/evaluator.go b/src/pkg/retention/policy/rule/latestps/evaluator.go index d0adb98a4..dd5d7572b 100644 --- a/src/pkg/retention/policy/rule/latestps/evaluator.go +++ b/src/pkg/retention/policy/rule/latestps/evaluator.go @@ -21,7 +21,7 @@ import ( "math" "sort" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/retention/policy/action" "github.com/goharbor/harbor/src/pkg/retention/policy/rule" ) diff --git a/src/pkg/robot/controller.go b/src/pkg/robot/controller.go index 8d47cd178..8cd2f5223 100644 --- a/src/pkg/robot/controller.go +++ b/src/pkg/robot/controller.go @@ -4,8 +4,8 @@ import ( "fmt" "github.com/dgrijalva/jwt-go" "github.com/goharbor/harbor/src/common" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/config" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/lib/q" "github.com/goharbor/harbor/src/pkg/robot/model" "github.com/goharbor/harbor/src/pkg/token" diff --git a/src/pkg/scan/dao/scan/report.go b/src/pkg/scan/dao/scan/report.go index fa024e58d..eecab5ca6 100644 --- a/src/pkg/scan/dao/scan/report.go +++ b/src/pkg/scan/dao/scan/report.go @@ -21,7 +21,7 @@ import ( "github.com/astaxie/beego/orm" "github.com/goharbor/harbor/src/common/dao" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/lib/q" "github.com/pkg/errors" ) diff --git a/src/pkg/scan/init.go b/src/pkg/scan/init.go index 565b6ca60..eedcd9a51 100644 --- a/src/pkg/scan/init.go +++ b/src/pkg/scan/init.go @@ -15,7 +15,7 @@ package scan import ( - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/lib/q" "github.com/goharbor/harbor/src/pkg/scan/dao/scanner" sc "github.com/goharbor/harbor/src/pkg/scan/scanner" diff --git a/src/pkg/scan/whitelist/manager.go b/src/pkg/scan/whitelist/manager.go index 2d244bdb2..df0508a9a 100644 --- a/src/pkg/scan/whitelist/manager.go +++ b/src/pkg/scan/whitelist/manager.go @@ -17,8 +17,8 @@ package whitelist import ( "github.com/goharbor/harbor/src/common/dao" "github.com/goharbor/harbor/src/common/models" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/jobservice/logger" + "github.com/goharbor/harbor/src/lib/log" ) // Manager defines the interface of CVE whitelist manager, it support both system level and project level whitelists diff --git a/src/pkg/scan/whitelist/manager_test.go b/src/pkg/scan/whitelist/manager_test.go index 8dbf6da37..1071323b3 100644 --- a/src/pkg/scan/whitelist/manager_test.go +++ b/src/pkg/scan/whitelist/manager_test.go @@ -2,7 +2,7 @@ package whitelist import ( "github.com/goharbor/harbor/src/common/dao" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/stretchr/testify/assert" "os" "testing" diff --git a/src/pkg/scheduler/scheduler.go b/src/pkg/scheduler/scheduler.go index 6fb7d7e87..b50e4e5e2 100644 --- a/src/pkg/scheduler/scheduler.go +++ b/src/pkg/scheduler/scheduler.go @@ -24,8 +24,8 @@ import ( chttp "github.com/goharbor/harbor/src/common/http" "github.com/goharbor/harbor/src/common/job" "github.com/goharbor/harbor/src/common/job/models" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/config" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/scheduler/model" "github.com/pkg/errors" ) diff --git a/src/pkg/signature/manager.go b/src/pkg/signature/manager.go index cfa2b551e..0dee140db 100644 --- a/src/pkg/signature/manager.go +++ b/src/pkg/signature/manager.go @@ -16,8 +16,8 @@ package signature import ( "github.com/goharbor/harbor/src/common/security" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/config" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/signature/notary" "github.com/goharbor/harbor/src/pkg/signature/notary/model" "golang.org/x/net/context" diff --git a/src/pkg/signature/notary/helper.go b/src/pkg/signature/notary/helper.go index 773804e3f..41521e2f7 100644 --- a/src/pkg/signature/notary/helper.go +++ b/src/pkg/signature/notary/helper.go @@ -24,9 +24,9 @@ import ( "github.com/docker/distribution/registry/auth/token" commonhttp "github.com/goharbor/harbor/src/common/http" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/config" tokenutil "github.com/goharbor/harbor/src/core/service/token" + "github.com/goharbor/harbor/src/lib/log" model2 "github.com/goharbor/harbor/src/pkg/signature/notary/model" "github.com/theupdateframework/notary" "github.com/theupdateframework/notary/client" diff --git a/src/pkg/signature/notary/transport.go b/src/pkg/signature/notary/transport.go index 50eb05c1d..7472b4c53 100644 --- a/src/pkg/signature/notary/transport.go +++ b/src/pkg/signature/notary/transport.go @@ -18,7 +18,7 @@ import ( "net/http" "github.com/goharbor/harbor/src/common/http/modifier" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" ) // Transport holds information about base transport and modifiers diff --git a/src/pkg/token/options.go b/src/pkg/token/options.go index e1d96d476..1d8d2602d 100644 --- a/src/pkg/token/options.go +++ b/src/pkg/token/options.go @@ -4,8 +4,8 @@ import ( "crypto/rsa" "fmt" "github.com/dgrijalva/jwt-go" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/config" + "github.com/goharbor/harbor/src/lib/log" "io/ioutil" "time" ) diff --git a/src/pkg/token/token.go b/src/pkg/token/token.go index 62e1e3fec..b350dacc8 100644 --- a/src/pkg/token/token.go +++ b/src/pkg/token/token.go @@ -6,7 +6,7 @@ import ( "errors" "fmt" "github.com/dgrijalva/jwt-go" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" ) // Token is a jwt token for harbor robot account, diff --git a/src/registryctl/api/health.go b/src/registryctl/api/health.go index 52ad5cd9a..94bb78da4 100644 --- a/src/registryctl/api/health.go +++ b/src/registryctl/api/health.go @@ -17,7 +17,7 @@ package api import ( "net/http" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" ) // Health ... diff --git a/src/registryctl/api/registry.go b/src/registryctl/api/registry.go index e453be6df..82dcc9df8 100644 --- a/src/registryctl/api/registry.go +++ b/src/registryctl/api/registry.go @@ -21,7 +21,7 @@ import ( "os/exec" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" ) const ( diff --git a/src/registryctl/client/client.go b/src/registryctl/client/client.go index 239583110..ccb0aef19 100644 --- a/src/registryctl/client/client.go +++ b/src/registryctl/client/client.go @@ -24,7 +24,7 @@ import ( common_http "github.com/goharbor/harbor/src/common/http" "github.com/goharbor/harbor/src/common/http/modifier/auth" "github.com/goharbor/harbor/src/common/utils" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/registryctl/api" ) diff --git a/src/registryctl/handlers/handler.go b/src/registryctl/handlers/handler.go index 39f6ae926..15c29fbe7 100644 --- a/src/registryctl/handlers/handler.go +++ b/src/registryctl/handlers/handler.go @@ -18,7 +18,7 @@ import ( "net/http" "os" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/registryctl/auth" gorilla_handlers "github.com/gorilla/handlers" ) diff --git a/src/registryctl/main.go b/src/registryctl/main.go index 4f6a3709e..89d7ceaae 100644 --- a/src/registryctl/main.go +++ b/src/registryctl/main.go @@ -20,7 +20,7 @@ import ( "net/http" common_http "github.com/goharbor/harbor/src/common/http" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/registryctl/config" "github.com/goharbor/harbor/src/registryctl/handlers" ) diff --git a/src/replication/adapter/aliacr/adapter.go b/src/replication/adapter/aliacr/adapter.go index 69d6914a2..6328f3e31 100644 --- a/src/replication/adapter/aliacr/adapter.go +++ b/src/replication/adapter/aliacr/adapter.go @@ -15,7 +15,7 @@ import ( "github.com/docker/distribution/registry/client/auth/challenge" commonhttp "github.com/goharbor/harbor/src/common/http" "github.com/goharbor/harbor/src/common/utils" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/registry/auth/bearer" adp "github.com/goharbor/harbor/src/replication/adapter" "github.com/goharbor/harbor/src/replication/adapter/native" diff --git a/src/replication/adapter/aliacr/auth.go b/src/replication/adapter/aliacr/auth.go index 349d7d7ee..45b01ad13 100644 --- a/src/replication/adapter/aliacr/auth.go +++ b/src/replication/adapter/aliacr/auth.go @@ -8,7 +8,7 @@ import ( "github.com/aliyun/alibaba-cloud-sdk-go/services/cr" "github.com/goharbor/harbor/src/common/http/modifier" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" ) // Credential ... diff --git a/src/replication/adapter/awsecr/adapter.go b/src/replication/adapter/awsecr/adapter.go index beb3c21b4..d73c50940 100644 --- a/src/replication/adapter/awsecr/adapter.go +++ b/src/replication/adapter/awsecr/adapter.go @@ -25,7 +25,7 @@ import ( "github.com/aws/aws-sdk-go/aws/session" awsecrapi "github.com/aws/aws-sdk-go/service/ecr" commonhttp "github.com/goharbor/harbor/src/common/http" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" adp "github.com/goharbor/harbor/src/replication/adapter" "github.com/goharbor/harbor/src/replication/adapter/native" "github.com/goharbor/harbor/src/replication/model" diff --git a/src/replication/adapter/awsecr/auth.go b/src/replication/adapter/awsecr/auth.go index c81e6f722..5d77ab122 100644 --- a/src/replication/adapter/awsecr/auth.go +++ b/src/replication/adapter/awsecr/auth.go @@ -30,7 +30,7 @@ import ( awsecrapi "github.com/aws/aws-sdk-go/service/ecr" commonhttp "github.com/goharbor/harbor/src/common/http" "github.com/goharbor/harbor/src/common/http/modifier" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" ) // Credential ... diff --git a/src/replication/adapter/azurecr/adapter.go b/src/replication/adapter/azurecr/adapter.go index bb8f33b0a..9bbe09f38 100644 --- a/src/replication/adapter/azurecr/adapter.go +++ b/src/replication/adapter/azurecr/adapter.go @@ -1,7 +1,7 @@ package azurecr import ( - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" adp "github.com/goharbor/harbor/src/replication/adapter" "github.com/goharbor/harbor/src/replication/adapter/native" "github.com/goharbor/harbor/src/replication/model" diff --git a/src/replication/adapter/dockerhub/adapter.go b/src/replication/adapter/dockerhub/adapter.go index c70999e8d..4a46fbcd3 100644 --- a/src/replication/adapter/dockerhub/adapter.go +++ b/src/replication/adapter/dockerhub/adapter.go @@ -10,7 +10,7 @@ import ( "strings" "github.com/goharbor/harbor/src/common/utils" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" adp "github.com/goharbor/harbor/src/replication/adapter" "github.com/goharbor/harbor/src/replication/adapter/native" "github.com/goharbor/harbor/src/replication/model" diff --git a/src/replication/adapter/dockerhub/client.go b/src/replication/adapter/dockerhub/client.go index 7e95d174c..13e19b991 100644 --- a/src/replication/adapter/dockerhub/client.go +++ b/src/replication/adapter/dockerhub/client.go @@ -8,7 +8,7 @@ import ( "io/ioutil" "net/http" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/replication/model" "github.com/goharbor/harbor/src/replication/util" ) diff --git a/src/replication/adapter/gitlab/adapter.go b/src/replication/adapter/gitlab/adapter.go index 64697e93f..14e651434 100644 --- a/src/replication/adapter/gitlab/adapter.go +++ b/src/replication/adapter/gitlab/adapter.go @@ -1,7 +1,7 @@ package gitlab import ( - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" adp "github.com/goharbor/harbor/src/replication/adapter" "github.com/goharbor/harbor/src/replication/adapter/native" "github.com/goharbor/harbor/src/replication/model" diff --git a/src/replication/adapter/gitlab/client.go b/src/replication/adapter/gitlab/client.go index 7281f461b..cf43993a3 100644 --- a/src/replication/adapter/gitlab/client.go +++ b/src/replication/adapter/gitlab/client.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" "github.com/docker/distribution/registry/client/auth/challenge" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/replication/model" "github.com/goharbor/harbor/src/replication/util" "io" diff --git a/src/replication/adapter/googlegcr/adapter.go b/src/replication/adapter/googlegcr/adapter.go index 13a5f52f2..f57e1e4d1 100644 --- a/src/replication/adapter/googlegcr/adapter.go +++ b/src/replication/adapter/googlegcr/adapter.go @@ -15,7 +15,7 @@ package googlegcr import ( - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" adp "github.com/goharbor/harbor/src/replication/adapter" "github.com/goharbor/harbor/src/replication/adapter/native" "github.com/goharbor/harbor/src/replication/model" diff --git a/src/replication/adapter/harbor/adapter.go b/src/replication/adapter/harbor/adapter.go index 157c7df63..5471fa9b5 100644 --- a/src/replication/adapter/harbor/adapter.go +++ b/src/replication/adapter/harbor/adapter.go @@ -25,8 +25,8 @@ import ( common_http "github.com/goharbor/harbor/src/common/http" "github.com/goharbor/harbor/src/common/http/modifier" common_http_auth "github.com/goharbor/harbor/src/common/http/modifier/auth" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/jobservice/config" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/registry/auth/basic" adp "github.com/goharbor/harbor/src/replication/adapter" diff --git a/src/replication/adapter/harbor/image_registry.go b/src/replication/adapter/harbor/image_registry.go index ebfef5701..5f52c3e15 100644 --- a/src/replication/adapter/harbor/image_registry.go +++ b/src/replication/adapter/harbor/image_registry.go @@ -19,8 +19,8 @@ import ( "github.com/goharbor/harbor/src/common/api" "github.com/goharbor/harbor/src/common/models" "github.com/goharbor/harbor/src/common/utils" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/controller/artifact" + "github.com/goharbor/harbor/src/lib/log" adp "github.com/goharbor/harbor/src/replication/adapter" "github.com/goharbor/harbor/src/replication/filter" "github.com/goharbor/harbor/src/replication/model" diff --git a/src/replication/adapter/helmhub/adapter.go b/src/replication/adapter/helmhub/adapter.go index ebfae5cfc..6cd8ef8b8 100644 --- a/src/replication/adapter/helmhub/adapter.go +++ b/src/replication/adapter/helmhub/adapter.go @@ -17,7 +17,7 @@ package helmhub import ( "errors" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" adp "github.com/goharbor/harbor/src/replication/adapter" "github.com/goharbor/harbor/src/replication/model" ) diff --git a/src/replication/adapter/helmhub/chart_registry.go b/src/replication/adapter/helmhub/chart_registry.go index f577b2d0f..2a62be236 100644 --- a/src/replication/adapter/helmhub/chart_registry.go +++ b/src/replication/adapter/helmhub/chart_registry.go @@ -22,7 +22,7 @@ import ( "net/http" "strings" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/replication/model" "github.com/pkg/errors" ) diff --git a/src/replication/adapter/huawei/huawei_adapter.go b/src/replication/adapter/huawei/huawei_adapter.go index 9dec3269d..4bd18c062 100644 --- a/src/replication/adapter/huawei/huawei_adapter.go +++ b/src/replication/adapter/huawei/huawei_adapter.go @@ -11,7 +11,7 @@ import ( common_http "github.com/goharbor/harbor/src/common/http" "github.com/goharbor/harbor/src/common/http/modifier" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" adp "github.com/goharbor/harbor/src/replication/adapter" "github.com/goharbor/harbor/src/replication/adapter/native" "github.com/goharbor/harbor/src/replication/model" diff --git a/src/replication/adapter/jfrog/adapter.go b/src/replication/adapter/jfrog/adapter.go index 42654101c..429d20c31 100644 --- a/src/replication/adapter/jfrog/adapter.go +++ b/src/replication/adapter/jfrog/adapter.go @@ -14,7 +14,7 @@ import ( common_http "github.com/goharbor/harbor/src/common/http" "github.com/goharbor/harbor/src/common/http/modifier" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" adp "github.com/goharbor/harbor/src/replication/adapter" "github.com/goharbor/harbor/src/replication/adapter/native" "github.com/goharbor/harbor/src/replication/model" diff --git a/src/replication/adapter/native/adapter.go b/src/replication/adapter/native/adapter.go index 7176ad27a..610a24237 100644 --- a/src/replication/adapter/native/adapter.go +++ b/src/replication/adapter/native/adapter.go @@ -18,9 +18,9 @@ import ( "fmt" "github.com/goharbor/harbor/src/common/utils" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/lib" "github.com/goharbor/harbor/src/lib/errors" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/registry" adp "github.com/goharbor/harbor/src/replication/adapter" "github.com/goharbor/harbor/src/replication/filter" diff --git a/src/replication/adapter/quayio/adapter.go b/src/replication/adapter/quayio/adapter.go index 5a41d84b0..37a97c92a 100644 --- a/src/replication/adapter/quayio/adapter.go +++ b/src/replication/adapter/quayio/adapter.go @@ -11,7 +11,7 @@ import ( common_http "github.com/goharbor/harbor/src/common/http" "github.com/goharbor/harbor/src/common/http/modifier" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" adp "github.com/goharbor/harbor/src/replication/adapter" "github.com/goharbor/harbor/src/replication/adapter/native" "github.com/goharbor/harbor/src/replication/model" diff --git a/src/replication/dao/execution.go b/src/replication/dao/execution.go index 04099d96e..bddc30194 100644 --- a/src/replication/dao/execution.go +++ b/src/replication/dao/execution.go @@ -20,7 +20,7 @@ import ( "github.com/astaxie/beego/orm" "github.com/goharbor/harbor/src/common/dao" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/replication/dao/models" ) diff --git a/src/replication/event/handler.go b/src/replication/event/handler.go index de1ec50e7..f326aa766 100644 --- a/src/replication/event/handler.go +++ b/src/replication/event/handler.go @@ -19,7 +19,7 @@ import ( "fmt" commonthttp "github.com/goharbor/harbor/src/common/http" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/replication/config" "github.com/goharbor/harbor/src/replication/model" "github.com/goharbor/harbor/src/replication/operation" diff --git a/src/replication/operation/controller.go b/src/replication/operation/controller.go index 11f77acec..d630d59e7 100644 --- a/src/replication/operation/controller.go +++ b/src/replication/operation/controller.go @@ -20,8 +20,8 @@ import ( "time" "github.com/goharbor/harbor/src/common/job" - "github.com/goharbor/harbor/src/common/utils/log" hjob "github.com/goharbor/harbor/src/jobservice/job" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/replication/dao/models" "github.com/goharbor/harbor/src/replication/model" "github.com/goharbor/harbor/src/replication/operation/execution" diff --git a/src/replication/operation/flow/copy.go b/src/replication/operation/flow/copy.go index 00489c314..993f81c51 100644 --- a/src/replication/operation/flow/copy.go +++ b/src/replication/operation/flow/copy.go @@ -17,7 +17,7 @@ package flow import ( "time" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/replication/dao/models" "github.com/goharbor/harbor/src/replication/model" "github.com/goharbor/harbor/src/replication/operation/execution" diff --git a/src/replication/operation/flow/deletion.go b/src/replication/operation/flow/deletion.go index 7fcaabce1..64058b73c 100644 --- a/src/replication/operation/flow/deletion.go +++ b/src/replication/operation/flow/deletion.go @@ -15,7 +15,7 @@ package flow import ( - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/replication/model" "github.com/goharbor/harbor/src/replication/operation/execution" "github.com/goharbor/harbor/src/replication/operation/scheduler" diff --git a/src/replication/operation/flow/stage.go b/src/replication/operation/flow/stage.go index 6fa0a151b..d0356eaeb 100644 --- a/src/replication/operation/flow/stage.go +++ b/src/replication/operation/flow/stage.go @@ -20,7 +20,7 @@ import ( "github.com/goharbor/harbor/src/replication/filter" "time" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" adp "github.com/goharbor/harbor/src/replication/adapter" "github.com/goharbor/harbor/src/replication/dao/models" "github.com/goharbor/harbor/src/replication/model" diff --git a/src/replication/policy/controller/controller.go b/src/replication/policy/controller/controller.go index 3df2befb4..c9a2e5a6f 100644 --- a/src/replication/policy/controller/controller.go +++ b/src/replication/policy/controller/controller.go @@ -18,7 +18,7 @@ import ( "fmt" "github.com/goharbor/harbor/src/common/job" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/replication/model" "github.com/goharbor/harbor/src/replication/policy" "github.com/goharbor/harbor/src/replication/policy/manager" diff --git a/src/replication/policy/manager/manager.go b/src/replication/policy/manager/manager.go index cdd67a20c..4c37a7151 100644 --- a/src/replication/policy/manager/manager.go +++ b/src/replication/policy/manager/manager.go @@ -21,7 +21,7 @@ import ( "strings" "time" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/replication/dao" persist_models "github.com/goharbor/harbor/src/replication/dao/models" "github.com/goharbor/harbor/src/replication/model" diff --git a/src/replication/policy/scheduler/scheduler.go b/src/replication/policy/scheduler/scheduler.go index 789d8af66..2096861ec 100644 --- a/src/replication/policy/scheduler/scheduler.go +++ b/src/replication/policy/scheduler/scheduler.go @@ -23,8 +23,8 @@ import ( commonHttp "github.com/goharbor/harbor/src/common/http" "github.com/goharbor/harbor/src/common/job" jobModels "github.com/goharbor/harbor/src/common/job/models" - "github.com/goharbor/harbor/src/common/utils/log" jsJob "github.com/goharbor/harbor/src/jobservice/job" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/replication/config" "github.com/goharbor/harbor/src/replication/dao" "github.com/goharbor/harbor/src/replication/dao/models" diff --git a/src/replication/registry/healthcheck.go b/src/replication/registry/healthcheck.go index 20fa09268..8f0dda8e1 100644 --- a/src/replication/registry/healthcheck.go +++ b/src/replication/registry/healthcheck.go @@ -18,7 +18,7 @@ import ( "math/rand" "time" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" ) // MinInterval defines the minimum interval to check registries' health status. diff --git a/src/replication/registry/manager.go b/src/replication/registry/manager.go index 34628f2e8..b84d4869b 100644 --- a/src/replication/registry/manager.go +++ b/src/replication/registry/manager.go @@ -18,7 +18,7 @@ import ( "fmt" "github.com/goharbor/harbor/src/common/utils" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/replication/adapter" "github.com/goharbor/harbor/src/replication/config" "github.com/goharbor/harbor/src/replication/dao" diff --git a/src/replication/replication.go b/src/replication/replication.go index 1393f09fb..a678a5272 100644 --- a/src/replication/replication.go +++ b/src/replication/replication.go @@ -18,8 +18,8 @@ import ( "time" "github.com/goharbor/harbor/src/common/job" - "github.com/goharbor/harbor/src/common/utils/log" cfg "github.com/goharbor/harbor/src/core/config" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/replication/config" "github.com/goharbor/harbor/src/replication/event" "github.com/goharbor/harbor/src/replication/operation" diff --git a/src/replication/transfer/chart/transfer.go b/src/replication/transfer/chart/transfer.go index ce2610350..20fd846b7 100644 --- a/src/replication/transfer/chart/transfer.go +++ b/src/replication/transfer/chart/transfer.go @@ -17,7 +17,7 @@ package chart import ( "errors" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/replication/adapter" "github.com/goharbor/harbor/src/replication/model" trans "github.com/goharbor/harbor/src/replication/transfer" diff --git a/src/replication/transfer/chart/transfer_test.go b/src/replication/transfer/chart/transfer_test.go index 45df2f68d..aa6430555 100644 --- a/src/replication/transfer/chart/transfer_test.go +++ b/src/replication/transfer/chart/transfer_test.go @@ -20,7 +20,7 @@ import ( "io/ioutil" "testing" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/replication/model" trans "github.com/goharbor/harbor/src/replication/transfer" "github.com/stretchr/testify/assert" diff --git a/src/replication/transfer/image/transfer.go b/src/replication/transfer/image/transfer.go index f8713794c..7a02cdc7c 100644 --- a/src/replication/transfer/image/transfer.go +++ b/src/replication/transfer/image/transfer.go @@ -25,7 +25,7 @@ import ( "github.com/docker/distribution" "github.com/docker/distribution/manifest/schema2" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/replication/adapter" "github.com/goharbor/harbor/src/replication/model" trans "github.com/goharbor/harbor/src/replication/transfer" diff --git a/src/replication/transfer/image/transfer_test.go b/src/replication/transfer/image/transfer_test.go index f9ce5886a..dbfa49a0e 100644 --- a/src/replication/transfer/image/transfer_test.go +++ b/src/replication/transfer/image/transfer_test.go @@ -22,7 +22,7 @@ import ( "github.com/docker/distribution" "github.com/docker/distribution/manifest/schema2" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/replication/model" trans "github.com/goharbor/harbor/src/replication/transfer" "github.com/stretchr/testify/assert" diff --git a/src/server/error/error.go b/src/server/error/error.go index 620f862c3..7a23ebfdd 100644 --- a/src/server/error/error.go +++ b/src/server/error/error.go @@ -20,8 +20,8 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" commonhttp "github.com/goharbor/harbor/src/common/http" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/lib/errors" + "github.com/goharbor/harbor/src/lib/log" "net/http" "strings" ) diff --git a/src/server/middleware/artifactinfo/artifact_info.go b/src/server/middleware/artifactinfo/artifact_info.go index 01136ad47..873630b48 100644 --- a/src/server/middleware/artifactinfo/artifact_info.go +++ b/src/server/middleware/artifactinfo/artifact_info.go @@ -21,9 +21,9 @@ import ( "regexp" "strings" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/lib" "github.com/goharbor/harbor/src/lib/errors" + "github.com/goharbor/harbor/src/lib/log" serror "github.com/goharbor/harbor/src/server/error" "github.com/goharbor/harbor/src/server/middleware" "github.com/opencontainers/go-digest" diff --git a/src/server/middleware/blob/copy_artifact.go b/src/server/middleware/blob/copy_artifact.go index 8bfc07a00..9cbdb9635 100644 --- a/src/server/middleware/blob/copy_artifact.go +++ b/src/server/middleware/blob/copy_artifact.go @@ -32,9 +32,9 @@ import ( "net/http" "strings" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/controller/artifact" "github.com/goharbor/harbor/src/lib/errors" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/blob" "github.com/goharbor/harbor/src/pkg/distribution" "github.com/goharbor/harbor/src/server/middleware" diff --git a/src/server/middleware/blob/post_initiate_blob_upload.go b/src/server/middleware/blob/post_initiate_blob_upload.go index a9ad8a601..33eb42c11 100644 --- a/src/server/middleware/blob/post_initiate_blob_upload.go +++ b/src/server/middleware/blob/post_initiate_blob_upload.go @@ -17,7 +17,7 @@ package blob import ( "net/http" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/distribution" "github.com/goharbor/harbor/src/server/middleware" ) diff --git a/src/server/middleware/blob/put_blob_upload.go b/src/server/middleware/blob/put_blob_upload.go index ad8826edc..5530473bc 100644 --- a/src/server/middleware/blob/put_blob_upload.go +++ b/src/server/middleware/blob/put_blob_upload.go @@ -18,7 +18,7 @@ import ( "net/http" "strconv" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/distribution" "github.com/goharbor/harbor/src/server/middleware" ) diff --git a/src/server/middleware/blob/put_manifest.go b/src/server/middleware/blob/put_manifest.go index 12292e9bc..4076d3ed1 100644 --- a/src/server/middleware/blob/put_manifest.go +++ b/src/server/middleware/blob/put_manifest.go @@ -18,7 +18,7 @@ import ( "io/ioutil" "net/http" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/distribution" "github.com/goharbor/harbor/src/server/middleware" "github.com/justinas/alice" diff --git a/src/server/middleware/csrf/csrf.go b/src/server/middleware/csrf/csrf.go index 3292a781c..0a8fc9167 100644 --- a/src/server/middleware/csrf/csrf.go +++ b/src/server/middleware/csrf/csrf.go @@ -7,10 +7,10 @@ import ( "sync" "github.com/goharbor/harbor/src/common/utils" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/config" "github.com/goharbor/harbor/src/lib" "github.com/goharbor/harbor/src/lib/errors" + "github.com/goharbor/harbor/src/lib/log" serror "github.com/goharbor/harbor/src/server/error" "github.com/goharbor/harbor/src/server/middleware" "github.com/gorilla/csrf" diff --git a/src/server/middleware/immutable/pushmf.go b/src/server/middleware/immutable/pushmf.go index da359e413..18c1e865b 100644 --- a/src/server/middleware/immutable/pushmf.go +++ b/src/server/middleware/immutable/pushmf.go @@ -5,11 +5,11 @@ import ( "net/http" common_util "github.com/goharbor/harbor/src/common/utils" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/controller/artifact" "github.com/goharbor/harbor/src/controller/tag" "github.com/goharbor/harbor/src/lib" errors "github.com/goharbor/harbor/src/lib/errors" + "github.com/goharbor/harbor/src/lib/log" serror "github.com/goharbor/harbor/src/server/error" ) diff --git a/src/server/middleware/log/log.go b/src/server/middleware/log/log.go index 9e66e34d1..715745636 100644 --- a/src/server/middleware/log/log.go +++ b/src/server/middleware/log/log.go @@ -17,7 +17,7 @@ package log import ( "net/http" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/server/middleware" ) diff --git a/src/server/middleware/log/log_test.go b/src/server/middleware/log/log_test.go index cb6e9f6da..c61f55e8c 100644 --- a/src/server/middleware/log/log_test.go +++ b/src/server/middleware/log/log_test.go @@ -19,7 +19,7 @@ import ( "net/http/httptest" "testing" - "github.com/goharbor/harbor/src/common/utils/log" + "github.com/goharbor/harbor/src/lib/log" "github.com/stretchr/testify/suite" ) diff --git a/src/server/middleware/quota/copy_artifact.go b/src/server/middleware/quota/copy_artifact.go index 8f65f7e67..67b7a9d3f 100644 --- a/src/server/middleware/quota/copy_artifact.go +++ b/src/server/middleware/quota/copy_artifact.go @@ -35,10 +35,10 @@ import ( "strings" "time" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/controller/artifact" "github.com/goharbor/harbor/src/controller/event/metadata" "github.com/goharbor/harbor/src/lib/errors" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/lib/q" "github.com/goharbor/harbor/src/pkg/blob" "github.com/goharbor/harbor/src/pkg/distribution" diff --git a/src/server/middleware/quota/post_initiate_blob_upload.go b/src/server/middleware/quota/post_initiate_blob_upload.go index e951ffff8..afd6f3fd5 100644 --- a/src/server/middleware/quota/post_initiate_blob_upload.go +++ b/src/server/middleware/quota/post_initiate_blob_upload.go @@ -18,9 +18,9 @@ import ( "net/http" "strconv" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/controller/blob" "github.com/goharbor/harbor/src/lib/errors" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/types" ) diff --git a/src/server/middleware/quota/put_blob_upload.go b/src/server/middleware/quota/put_blob_upload.go index 7dfeddd11..88c05c394 100644 --- a/src/server/middleware/quota/put_blob_upload.go +++ b/src/server/middleware/quota/put_blob_upload.go @@ -18,8 +18,8 @@ import ( "net/http" "strconv" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/controller/blob" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/distribution" "github.com/goharbor/harbor/src/pkg/types" ) diff --git a/src/server/middleware/quota/put_manifest.go b/src/server/middleware/quota/put_manifest.go index d61dd8c0f..aca34b9d0 100644 --- a/src/server/middleware/quota/put_manifest.go +++ b/src/server/middleware/quota/put_manifest.go @@ -20,10 +20,10 @@ import ( "strconv" "time" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/controller/blob" "github.com/goharbor/harbor/src/controller/event/metadata" "github.com/goharbor/harbor/src/lib" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/blob/models" "github.com/goharbor/harbor/src/pkg/distribution" "github.com/goharbor/harbor/src/pkg/notifier/event" diff --git a/src/server/middleware/quota/quota.go b/src/server/middleware/quota/quota.go index dbce39ab8..dbf5c1388 100644 --- a/src/server/middleware/quota/quota.go +++ b/src/server/middleware/quota/quota.go @@ -20,8 +20,8 @@ import ( "net/http" "strings" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/lib" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/notification" "github.com/goharbor/harbor/src/pkg/notifier/event" "github.com/goharbor/harbor/src/pkg/quota" diff --git a/src/server/middleware/security/auth_proxy.go b/src/server/middleware/security/auth_proxy.go index 7d07f7eea..363900d96 100644 --- a/src/server/middleware/security/auth_proxy.go +++ b/src/server/middleware/security/auth_proxy.go @@ -23,10 +23,10 @@ import ( "github.com/goharbor/harbor/src/common/models" "github.com/goharbor/harbor/src/common/security" "github.com/goharbor/harbor/src/common/security/local" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/auth" "github.com/goharbor/harbor/src/core/config" "github.com/goharbor/harbor/src/lib" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/authproxy" ) diff --git a/src/server/middleware/security/basic_auth.go b/src/server/middleware/security/basic_auth.go index bda28869a..2d6c97a73 100644 --- a/src/server/middleware/security/basic_auth.go +++ b/src/server/middleware/security/basic_auth.go @@ -20,9 +20,9 @@ import ( "github.com/goharbor/harbor/src/common/models" "github.com/goharbor/harbor/src/common/security" "github.com/goharbor/harbor/src/common/security/local" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/auth" "github.com/goharbor/harbor/src/core/config" + "github.com/goharbor/harbor/src/lib/log" ) type basicAuth struct{} diff --git a/src/server/middleware/security/idtoken.go b/src/server/middleware/security/idtoken.go index a3fd0749c..192657756 100644 --- a/src/server/middleware/security/idtoken.go +++ b/src/server/middleware/security/idtoken.go @@ -24,10 +24,10 @@ import ( "github.com/goharbor/harbor/src/common/models" "github.com/goharbor/harbor/src/common/security" "github.com/goharbor/harbor/src/common/security/local" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/oidc" "github.com/goharbor/harbor/src/core/config" "github.com/goharbor/harbor/src/lib" + "github.com/goharbor/harbor/src/lib/log" ) type idToken struct{} diff --git a/src/server/middleware/security/oidc_cli.go b/src/server/middleware/security/oidc_cli.go index 4ebff36d8..2cf4a3032 100644 --- a/src/server/middleware/security/oidc_cli.go +++ b/src/server/middleware/security/oidc_cli.go @@ -23,10 +23,10 @@ import ( "github.com/goharbor/harbor/src/common/api" "github.com/goharbor/harbor/src/common/security" "github.com/goharbor/harbor/src/common/security/local" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/oidc" "github.com/goharbor/harbor/src/core/config" "github.com/goharbor/harbor/src/lib" + "github.com/goharbor/harbor/src/lib/log" ) type oidcCli struct{} diff --git a/src/server/middleware/security/robot.go b/src/server/middleware/security/robot.go index 2266a7fb5..b289639f2 100644 --- a/src/server/middleware/security/robot.go +++ b/src/server/middleware/security/robot.go @@ -21,8 +21,8 @@ import ( "github.com/goharbor/harbor/src/common" "github.com/goharbor/harbor/src/common/security" robotCtx "github.com/goharbor/harbor/src/common/security/robot" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/config" + "github.com/goharbor/harbor/src/lib/log" pkgrobot "github.com/goharbor/harbor/src/pkg/robot" pkg_token "github.com/goharbor/harbor/src/pkg/token" robot_claim "github.com/goharbor/harbor/src/pkg/token/claims/robot" diff --git a/src/server/middleware/security/secret.go b/src/server/middleware/security/secret.go index 6cb27b060..08946cd5f 100644 --- a/src/server/middleware/security/secret.go +++ b/src/server/middleware/security/secret.go @@ -20,8 +20,8 @@ import ( commonsecret "github.com/goharbor/harbor/src/common/secret" "github.com/goharbor/harbor/src/common/security" securitysecret "github.com/goharbor/harbor/src/common/security/secret" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/config" + "github.com/goharbor/harbor/src/lib/log" ) type secret struct{} diff --git a/src/server/middleware/security/security.go b/src/server/middleware/security/security.go index f99cbe4eb..c5bc8fc31 100644 --- a/src/server/middleware/security/security.go +++ b/src/server/middleware/security/security.go @@ -18,9 +18,9 @@ import ( "net/http" "github.com/goharbor/harbor/src/common/security" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/config" "github.com/goharbor/harbor/src/lib" + "github.com/goharbor/harbor/src/lib/log" ) var ( diff --git a/src/server/middleware/security/session.go b/src/server/middleware/security/session.go index cb6511f8e..5f6f8467d 100644 --- a/src/server/middleware/security/session.go +++ b/src/server/middleware/security/session.go @@ -22,8 +22,8 @@ import ( "github.com/goharbor/harbor/src/common/models" "github.com/goharbor/harbor/src/common/security" "github.com/goharbor/harbor/src/common/security/local" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/config" + "github.com/goharbor/harbor/src/lib/log" ) type session struct{} diff --git a/src/server/middleware/security/unauthorized.go b/src/server/middleware/security/unauthorized.go index 342e5c13c..06f420a34 100644 --- a/src/server/middleware/security/unauthorized.go +++ b/src/server/middleware/security/unauthorized.go @@ -19,8 +19,8 @@ import ( "github.com/goharbor/harbor/src/common/security" "github.com/goharbor/harbor/src/common/security/local" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/config" + "github.com/goharbor/harbor/src/lib/log" ) type unauthorized struct{} diff --git a/src/server/middleware/transaction/transaction.go b/src/server/middleware/transaction/transaction.go index 2364dcc5b..3789942cb 100644 --- a/src/server/middleware/transaction/transaction.go +++ b/src/server/middleware/transaction/transaction.go @@ -20,8 +20,8 @@ import ( "fmt" "net/http" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/lib" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/lib/orm" serror "github.com/goharbor/harbor/src/server/error" "github.com/goharbor/harbor/src/server/middleware" diff --git a/src/server/middleware/v2auth/auth.go b/src/server/middleware/v2auth/auth.go index 86ac09297..b48f88797 100644 --- a/src/server/middleware/v2auth/auth.go +++ b/src/server/middleware/v2auth/auth.go @@ -21,11 +21,11 @@ import ( "github.com/goharbor/harbor/src/common/rbac" "github.com/goharbor/harbor/src/common/security" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/core/config" "github.com/goharbor/harbor/src/core/promgr" "github.com/goharbor/harbor/src/lib" "github.com/goharbor/harbor/src/lib/errors" + "github.com/goharbor/harbor/src/lib/log" serror "github.com/goharbor/harbor/src/server/error" "github.com/goharbor/harbor/src/server/middleware" ) diff --git a/src/server/middleware/vulnerable/vulnerable.go b/src/server/middleware/vulnerable/vulnerable.go index 803c8e590..399fdc288 100644 --- a/src/server/middleware/vulnerable/vulnerable.go +++ b/src/server/middleware/vulnerable/vulnerable.go @@ -20,12 +20,12 @@ import ( "github.com/goharbor/harbor/src/common/rbac" "github.com/goharbor/harbor/src/common/security" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/controller/artifact" "github.com/goharbor/harbor/src/controller/project" "github.com/goharbor/harbor/src/controller/scan" "github.com/goharbor/harbor/src/lib" "github.com/goharbor/harbor/src/lib/errors" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/scan/report" v1 "github.com/goharbor/harbor/src/pkg/scan/rest/v1" "github.com/goharbor/harbor/src/pkg/scan/vuln" diff --git a/src/server/registry/manifest.go b/src/server/registry/manifest.go index 20c2c65f5..ed58e6f1a 100644 --- a/src/server/registry/manifest.go +++ b/src/server/registry/manifest.go @@ -15,12 +15,12 @@ package registry import ( - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/controller/artifact" "github.com/goharbor/harbor/src/controller/event/metadata" "github.com/goharbor/harbor/src/controller/repository" "github.com/goharbor/harbor/src/lib" "github.com/goharbor/harbor/src/lib/errors" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/notification" "github.com/goharbor/harbor/src/pkg/registry" serror "github.com/goharbor/harbor/src/server/error" diff --git a/src/server/v2.0/handler/assembler/vul.go b/src/server/v2.0/handler/assembler/vul.go index de23920ed..3e7ebadc2 100644 --- a/src/server/v2.0/handler/assembler/vul.go +++ b/src/server/v2.0/handler/assembler/vul.go @@ -17,9 +17,9 @@ package assembler import ( "context" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/controller/scan" "github.com/goharbor/harbor/src/lib" + "github.com/goharbor/harbor/src/lib/log" v1 "github.com/goharbor/harbor/src/pkg/scan/rest/v1" "github.com/goharbor/harbor/src/server/v2.0/handler/model" ) diff --git a/src/server/v2.0/handler/base.go b/src/server/v2.0/handler/base.go index d0b0bc07a..6d05302b4 100644 --- a/src/server/v2.0/handler/base.go +++ b/src/server/v2.0/handler/base.go @@ -28,8 +28,8 @@ import ( "github.com/goharbor/harbor/src/common/rbac" "github.com/goharbor/harbor/src/common/security" "github.com/goharbor/harbor/src/common/utils" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/controller/project" + "github.com/goharbor/harbor/src/lib/log" errs "github.com/goharbor/harbor/src/server/error" ) diff --git a/src/server/v2.0/handler/model/artifact.go b/src/server/v2.0/handler/model/artifact.go index 9fec0ed25..9628d0a9f 100644 --- a/src/server/v2.0/handler/model/artifact.go +++ b/src/server/v2.0/handler/model/artifact.go @@ -18,8 +18,8 @@ import ( "encoding/json" "github.com/go-openapi/strfmt" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/controller/artifact" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/server/v2.0/models" ) diff --git a/src/server/v2.0/handler/repository.go b/src/server/v2.0/handler/repository.go index e11d2c627..1be401c61 100644 --- a/src/server/v2.0/handler/repository.go +++ b/src/server/v2.0/handler/repository.go @@ -23,10 +23,10 @@ import ( "github.com/go-openapi/runtime/middleware" cmodels "github.com/goharbor/harbor/src/common/models" "github.com/goharbor/harbor/src/common/rbac" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/controller/artifact" "github.com/goharbor/harbor/src/controller/project" "github.com/goharbor/harbor/src/controller/repository" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/lib/q" "github.com/goharbor/harbor/src/server/v2.0/models" operation "github.com/goharbor/harbor/src/server/v2.0/restapi/operations/repository" diff --git a/src/server/v2.0/handler/util.go b/src/server/v2.0/handler/util.go index 954af7866..46d244a16 100644 --- a/src/server/v2.0/handler/util.go +++ b/src/server/v2.0/handler/util.go @@ -21,10 +21,10 @@ import ( "net/url" "reflect" - "github.com/goharbor/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/controller/artifact" "github.com/goharbor/harbor/src/controller/artifact/processor" "github.com/goharbor/harbor/src/controller/scan" + "github.com/goharbor/harbor/src/lib/log" "github.com/goharbor/harbor/src/pkg/scan/report" v1 "github.com/goharbor/harbor/src/pkg/scan/rest/v1" ) diff --git a/src/testing/chart_utility.go b/src/testing/chart_utility.go index 82dd6fca5..a6b7a9a49 100644 --- a/src/testing/chart_utility.go +++ b/src/testing/chart_utility.go @@ -9,7 +9,7 @@ import ( "net/http" "strings" - hlog "github.com/goharbor/harbor/src/common/utils/log" + hlog "github.com/goharbor/harbor/src/lib/log" ) // MockChartRepoHandler is the backend chart server handler