Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add mdc to update command (DAT-12602) (#3647)
* add MDC interfaces and base classes (DAT-12601) (#3567) Create the basic APIs for MDC in support of structured logging. * set log format in log service * add deprecated annotation * Revert "set log format in log service" This reverts commit 096b067. * use log formatter for JSON logging * add MDC to structured log output * fix test * Include "path" in databasechangelog's description column for all change types with "path" attributes (#3244) Extends the DESCRIPTION column of the DATABASECHANGELOG for sqlFile by the path specification, for example sqlFile path=IUNT200.sql Co-authored-by: michaelmatthiaskern <michael.kern@mail.de> Co-authored-by: Nathan Voxland <nathan@voxland.net> * #1466: Add ignore:true changeset attribute to Formatted SQL changeLogs (#3377) Co-authored-by: skrivenko <skrivenko@users.noreply.github.com> Co-authored-by: filipe lautert <flautert@liquibase.org> * [DAT-12602] Initial update mdc implementation. * add configuration option for log format * [DAT-12602] Adds remaining mdc values. Reworks to use static strings over enum. * [DAT-12602] Remove unused keys, fixed formatting. * [DAT-12602] Adds system information to mdc. * [DAT-12602] Fixes formatting for mdckey. * [DAT-12602] Simplifies getting mdc for command name. * updated logFormat description * warn about invalid values for log format * [DAT-12602] Add changeset outcome to info log, fix deployment outcome to actually show in info. * Revert "Merge remote-tracking branch 'origin/DAT-11693' into DAT-12602" This reverts commit 6e9163d, reversing changes made to 1ceec55. * Revert "Merge remote-tracking branch 'origin/DAT-12727' into DAT-12602" This reverts commit 8554e29, reversing changes made to 10d540b. * Revert "Revert "Merge remote-tracking branch 'origin/DAT-11693' into DAT-12602"" This reverts commit 10d540b. * Revert "Revert "Merge remote-tracking branch 'origin/DAT-12727' into DAT-12602"" This reverts commit 12f6539. * [DAT-12602] Fix liquibase system information mdc. * [DAT-12602] Fix logged liquibase version. * Revert change to build.properties * safely cast logformat - fixes using the default value * [DAT-12602] Adds mdc for failed changeset outcome. Co-authored-by: Steven Massaro <steven.massaro.web@gmail.com> Co-authored-by: MichaelKern-IVV <102645261+MichaelKern-IVV@users.noreply.github.com> Co-authored-by: michaelmatthiaskern <michael.kern@mail.de> Co-authored-by: Nathan Voxland <nathan@voxland.net> Co-authored-by: skrivenko <72100114+skrivenko@users.noreply.github.com> Co-authored-by: skrivenko <skrivenko@users.noreply.github.com> Co-authored-by: filipe lautert <flautert@liquibase.org>
- Loading branch information
1 parent
8b88b8b
commit 6df7146
Showing
8 changed files
with
73 additions
and
3 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
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
20 changes: 20 additions & 0 deletions
20
liquibase-core/src/main/java/liquibase/logging/mdc/MdcKey.java
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,20 @@ | ||
package liquibase.logging.mdc; | ||
|
||
public class MdcKey { | ||
public static final String DEPLOYMENT_ID = "deploymentId"; | ||
public static final String CHANGESET_ID = "changesetId"; | ||
public static final String CHANGESET_AUTHOR = "changesetAuthor"; | ||
public static final String CHANGESET_FILEPATH = "changesetFilepath"; | ||
public static final String CHANGESET_OUTCOME = "changesetOutcome"; | ||
public static final String OPERATION_TYPE = "liquibaseOperation"; | ||
public static final String OPERATION_TARGET_TYPE = "liquibaseTargetType"; | ||
public static final String OPERATION_TARGET_VALUE = "liquibaseTarget"; | ||
public static final String CHANGESET_OPERATION_START_TIME = "changesetOperationStart"; | ||
public static final String CHANGESET_OPERATION_STOP_TIME = "changesetOperationStop"; | ||
public static final String CHANGESET_SQL = "changesetSql"; | ||
public static final String DEPLOYMENT_OUTCOME = "deploymentOutcome"; | ||
public static final String LIQUIBASE_COMMAND_NAME = "liquibaseCommandName"; | ||
public static final String LIQUIBASE_VERSION = "liquibaseVersion"; | ||
public static final String LIQUIBASE_SYSTEM_NAME = "liquibaseSystemName"; | ||
public static final String LIQUIBASE_SYSTEM_USER = "liquibaseSystemUser"; | ||
} |
7 changes: 7 additions & 0 deletions
7
liquibase-core/src/main/java/liquibase/logging/mdc/MdcValue.java
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,7 @@ | ||
package liquibase.logging.mdc; | ||
|
||
public class MdcValue { | ||
public static final String COMMAND_SUCCESSFUL = "success"; | ||
public static final String COMMAND_FAILED = "fail"; | ||
public static final String URL_DATABASE_TARGET = "url"; | ||
} |