package logs import "go.uber.org/zap" const ( TagFieldName = "tag" TagApp = "app" TagDatapath = "datapath" TagExternalStorage = "external_storage" TagExternalStorageTree = "external_storage_tree" TagExternalBlockchain = "external_blockchain" ) func TagField(tag string) zap.Field { return zap.String(TagFieldName, tag) } // App. const ( ApplicationStarted = "application started" ApplicationFinished = "application finished" StartingServer = "starting server" StoppingServer = "stopping server" ServiceIsRunning = "service is running" ServiceCouldntStartOnConfiguredPort = "service couldn't start on configured port" ServiceHasntStartedSinceItsDisabled = "service hasn't started since it's disabled" ShuttingDownService = "shutting down service" CantGracefullyShutDownService = "can't gracefully shut down service, force stop" FailedToShutdownTracing = "failed to shutdown tracing" UsingCredentials = "using credentials" FailedToAddServer = "failed to add server" AddServer = "add server" CantShutDownService = "can't shut down service" FailedToCreateResolver = "failed to create resolver" CouldntGenerateRandomKey = "couldn't generate random key" FailedToCreateConnectionPool = "failed to create connection pool" FailedToDialConnectionPool = "failed to dial connection pool" FailedToCreateTreePool = "failed to create tree pool" FailedToDialTreePool = "failed to dial tree pool" ListenAndServe = "listen and serve" NoHealthyServers = "no healthy servers" CouldNotInitializeAPIHandler = "could not initialize API handler" InitFrostfsIDFailed = "init frostfsid failed" InitPolicyContractFailed = "init policy contract failed" ServerReconnecting = "reconnecting server..." ServerReconnectedSuccessfully = "server reconnected successfully" ServerReconnectFailed = "failed to reconnect server" CouldNotFetchCORSContainerInfo = "couldn't fetch CORS container info" CouldNotFetchAccessBoxContainerInfo = "couldn't fetch AccessBox container info" MultinetDialSuccess = "multinet dial successful" MultinetDialFail = "multinet dial failed" FailedToCreateWorkerPool = "failed to create worker pool" CouldNotLoadFrostFSPrivateKey = "could not load FrostFS private key" AddedStoragePeer = "added storage peer" SIGHUPConfigReloadStarted = "SIGHUP config reload started" MetricsAreDisabled = "metrics are disabled" ConstraintAdded = "constraint added" ContainerResolverWillBeDisabled = "container resolver will be disabled because of resolvers 'resolver_order' is empty" FailedToReloadConfigBecauseItsMissed = "failed to reload config because it's missed" FailedToReloadConfig = "failed to reload config" TracingConfigUpdated = "tracing config updated" FailedToReloadResolvers = "failed to reload resolvers" FailedToReloadServerParameters = "failed to reload server parameters" SIGHUPConfigReloadCompleted = "SIGHUP config reload completed" LogLevelWontBeUpdated = "log level won't be updated" ResolverNNSWontBeUsedSinceRPCEndpointIsntProvided = "resolver 'nns' won't be used since 'rpc_endpoint' isn't provided" InvalidLifetimeUsingDefaultValue = "invalid lifetime, using default value (in seconds)" InvalidCacheSizeUsingDefaultValue = "invalid cache size, using default value" FailedToParseDefaultLocationConstraint = "failed to parse 'default' location constraint, default one will be used" FailedToReadRegionMapFilePolicies = "failed to read region map file, policies will be empty" DefaultLocationConstraintCantBeOverriden = "'default' location constraint can't be overriden by custom policy, use 'placement_policy.default'" FailedToParseLocationConstraint = "failed to parse location constraint, it cannot be used" FailedToParseDefaultCopiesNumbers = "failed to parse 'default' copies numbers, default one will be used" FailedToParseCopiesNumbers = "failed to parse copies numbers, skip" FailedToInitializeTracing = "failed to initialize tracing" DefaultNamespacesCannotBeEmpty = "default namespaces cannot be empty, defaults will be used" FailedToParseNamespacesConfig = "failed to unmarshal namespaces config" DefaultNamespaceConfigValuesBeOverwritten = "default namespace config value be overwritten by values from 'namespaces.config'" MultipleDefaultOverridesFound = "multiple default overrides found, only one will be used" SkipEmptyAddress = "skip, empty address" FailedToParseDefaultDefaultLocationConstraint = "failed to parse default 'default' location constraint" LogHTTPDisabledInThisBuild = "http logging disabled in this build" InvalidDefaultMaxAge = "invalid defaultMaxAge" RuntimeSoftMemoryDefinedWithGOMEMLIMIT = "soft runtime memory defined with GOMEMLIMIT environment variable, config value skipped" RuntimeSoftMemoryLimitUpdated = "soft runtime memory limit value updated" InvalidAccessBoxCacheRemovingCheckInterval = "invalid accessbox check removing interval, using default value" WarnDuplicateAddress = "duplicate address" FailedToLoadMultinetConfig = "failed to load multinet config" MultinetConfigWontBeUpdated = "multinet config won't be updated" WarnDomainContainsPort = "the domain contains a port, domain skipped" TagsLogConfigWontBeUpdated = "tags log config won't be updated" CouldNotFetchLifecycleContainerInfo = "couldn't fetch lifecycle container info" WarnDuplicateNamespaceVHS = "duplicate namespace with enabled VHS, config value skipped" WarnValueVHSEnabledFlagWrongType = "the value of the VHS enable flag for the namespace is of the wrong type, config value skipped" WarnDomainContainsInvalidPlaceholder = "the domain contains an invalid placeholder, domain skipped" ) // Datapath. const ( NotSupported = "not supported" RequestUnmatched = "request unmatched" RequestStart = "request start" RequestFailed = "request failed" RequestEnd = "request end" AnonRequestSkipFrostfsIDValidation = "anon request, skip FrostfsID validation" CouldntReceiveAccessBoxForGateKeyRandomKeyWillBeUsed = "couldn't receive access box for gate key, random key will be used" FrostfsIDValidationFailed = "FrostfsID validation failed" FailedToPassAuthentication = "failed to pass authentication" PolicyValidationFailed = "policy validation failed" CouldNotCloseRequestBody = "could not close request body" BucketOwnerKeyIsMissing = "bucket owner key is missing" SuccessfulAuth = "successful auth" PolicyRequest = "policy request" FailedToGenerateRequestID = "failed to generate request id" FailedToWriteResponse = "failed to write response" PolicyCouldntBeConvertedToNativeRules = "policy couldn't be converted to native rules, only s3 rules be applied" FailedToParseHTTPTime = "failed to parse http time, header is ignored" WarnInvalidTypeTLSTerminationHeader = "invalid type of value of tls termination header" FailedToUnescapeObjectName = "failed to unescape object name" MismatchedObjEncryptionInfo = "mismatched obj encryptionInfo" CouldNotParseContainerObjectLockEnabledAttribute = "could not parse container object lock enabled attribute" FailedToParsePartInfo = "failed to parse part info" SettingsNodeInvalidOwnerKey = "settings node: invalid owner key" FailedToParseAddressInTreeNode = "failed to parse object addr in tree node" UnexpectedMultiNodeIDsInSubTreeMultiParts = "unexpected multi node ids in sub tree multi parts" FoundSeveralSystemNodes = "found several system nodes" BucketLifecycleNodeHasMultipleIDs = "bucket lifecycle node has multiple ids" UploadPart = "upload part" FailedToSubmitTaskToPool = "failed to submit task to pool" FailedToGetRealObjectSize = "failed to get real object size" PartDetails = "part details" BucketSettingsNotFoundUseDefaults = "bucket settings not found, use defaults" ParseTreeNode = "parse tree node" GetObject = "get object" GetTreeNodeToDelete = "get tree node to delete" InvalidBucketObjectLockEnabledHeader = "invalid X-Amz-Bucket-Object-Lock-Enabled header" InvalidCacheEntryType = "invalid cache entry type" InvalidCacheKeyType = "invalid cache key type" CouldntPutBucketInfoIntoCache = "couldn't put bucket info into cache" CouldntAddObjectToCache = "couldn't add object to cache" CouldntCacheAccessControlOperation = "couldn't cache access control operation" CouldntPutObjAddressToNameCache = "couldn't put obj address to name cache" CouldntPutAccessBoxIntoCache = "couldn't put accessbox into cache" CouldntCacheListOfObjects = "couldn't cache list of objects" CouldntCacheListSession = "couldn't cache list session" CouldntCacheTags = "couldn't cache tags" CouldntCacheLockInfo = "couldn't cache lock info" CouldntCacheNetworkInfo = "couldn't cache network info" CouldntCacheSubject = "couldn't cache subject info" CouldntCacheNetmap = "couldn't cache netmap" CouldntCacheUserKey = "couldn't cache user key" CouldntCacheBucketSettings = "couldn't cache bucket settings" CouldntCacheCors = "couldn't cache cors" CouldntCacheListPolicyChains = "couldn't cache list policy chains" CouldntCacheLifecycleConfiguration = "couldn't cache lifecycle configuration" GetBucketCors = "get bucket cors" GetBucketInfo = "get bucket info" ResolveBucket = "resolve bucket" FailedToResolveCID = "failed to resolve CID" FailedToDiscardPutPayloadProbablyGoroutineLeaks = "failed to discard put payload, probably goroutine leaks" ) // External storage. const ( ObjectIsCopied = "object is copied" CouldntDeleteObject = "couldn't delete object" CouldNotListUserContainers = "could not list user containers" CouldNotFetchContainerInfo = "could not fetch container info" CouldntDeleteObjectFromStorageContinueDeleting = "couldn't delete object from storage, continue deleting from tree" FailedToPutTombstoneObject = "failed to put tombstone object" FailedToListAllObjectRelations = "failed to list all object relations" FailedToPutTombstones = "failed to put tombstones" CouldntDeleteCorsObject = "couldn't delete cors object" BucketIsCreated = "bucket is created" CouldntDeleteOldPartObject = "couldn't delete old part object" CouldNotPutCompletedObject = "could not put a completed object (multipart upload)" CouldNotDeleteUploadPart = "could not delete upload part" PutObject = "put object" CouldNotFetchObjectMeta = "could not fetch object meta" FailedToDeleteObject = "failed to delete object" CouldntDeleteLifecycleObject = "couldn't delete lifecycle configuration object" ) // External blockchain. const ( UserGroupsListIsEmpty = "user groups list is empty, subject not found" ) // External storage tree. const ( FoundMoreThanOneUnversionedNode = "found more than one unversioned node" GetTreeNode = "get tree node" InvalidTreeKV = "invalid tree service meta KV" FailedToRemoveOldSystemNode = "failed to remove old system node" GetBucketLifecycle = "get bucket lifecycle" FailedToRemoveOldPartNode = "failed to remove old part node" SystemNodeHasMultipleIDs = "system node has multiple ids" ObjectTaggingNodeHasMultipleIDs = "object tagging node has multiple ids" BucketTaggingNodeHasMultipleIDs = "bucket tagging node has multiple ids" BucketSettingsNodeHasMultipleIDs = "bucket settings node has multiple ids" BucketCORSNodeHasMultipleIDs = "bucket cors node has multiple ids" GetBucketCorsFromTree = "get bucket cors from tree" ) // Authmate. const ( CreateContainer = "create container" CheckContainer = "check container" CheckCustomAccessKeyIDUniqueness = "check custom access key id uniqueness" StoreBearerTokenIntoFrostFS = "store bearer token into FrostFS" UpdateAccessCredObjectIntoFrostFS = "update access cred object into FrostFS" SubjectAlreadyExistsInFrostFSID = "subject already exists in frostfsid" SetSubjectNameInFrostFSID = "set subject name in frostfsid" AddPolicyChainRules = "add policy chain rules" PrepareConnectionPool = "prepare connection pool" PrepareFrostfsIDClient = "prepare frostfsid client" PreparePolicyClient = "prepare policy client" CreateSubjectInFrostFSID = "create subject in frostfsid" CloseCredsObjectPayload = "close creds object payload" ) // Log HTTP. const ( LogHTTP = "http log" FailedToCloseHTTPBody = "failed to close http body" FailedToInitializeHTTPLogger = "failed to initialize http logger" FailedToReadHTTPBody = "failed to read http body" FailedToProcessHTTPBody = "failed to process http body" )