-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Log ledger api validation failures at info level (#10080)
* CHANGELOG_BEGIN Log ledger api validation failures at info level CHANGELOG_END * log validation failures in Api*Service family of classes * address review comments
- Loading branch information
Showing
17 changed files
with
124 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...ger-api-common/src/main/scala/com/digitalasset/platform/server/api/ValidationLogger.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright (c) 2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package com.daml.platform.server.api | ||
|
||
import com.daml.logging.{ContextualizedLogger, LoggingContext} | ||
import org.slf4j.Logger | ||
|
||
object ValidationLogger { | ||
def logFailure[Request](request: Request, t: Throwable)(implicit logger: Logger): Throwable = { | ||
logger.debug(s"Request validation failed for $request. Message: ${t.getMessage}") | ||
logger.info(t.getMessage) | ||
t | ||
} | ||
|
||
def logFailureWithContext[Request](request: Request, t: Throwable)(implicit | ||
logger: ContextualizedLogger, | ||
loggingContext: LoggingContext, | ||
): Throwable = { | ||
logger.debug(s"Request validation failed for $request. Message: ${t.getMessage}") | ||
logger.info(t.getMessage) | ||
t | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 0 additions & 53 deletions
53
.../com/digitalasset/platform/server/api/validation/CommandCompletionServiceValidation.scala
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.