Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TT-12355] added log format config, func and test cases #6344

Merged
merged 15 commits into from
Sep 5, 2024

Conversation

LLe27
Copy link
Contributor

@LLe27 LLe27 commented Jun 13, 2024

FR Jira Ticket

https://tyktech.atlassian.net/browse/TT-12355

Description

  • Added the TYK_GW_LOGFORMAT Gateway config option
  • The Tyk Gateway will determine which format should be used for STDOUT logs
    • If the TYK_GW_LOGFORMAT is set to json the Gateway will output logs in JSON format
    • if the TYK_GW_LOGFORMAT is set to "" empty string or any other string value it will default the TEXT format

Additionally, TYK_LOGFORMAT is supported, as is TYK_LOGLEVEL (and TYK_GW_LOGLEVEL).

Note that there is some global use from the log package, I don't think we can set json output from json config, as it would be picked up too late. The one case to cover is to make sure this passes with only config enabled:

# TYK_GW_LOGFORMAT=json ./tyk 2>&1 | head -n 1
{"level":"info","msg":"Tyk API Gateway v5.3.0-dev","prefix":"main","time":"2024-07-10T15:16:11+02:00"}
# TYK_LOGFORMAT=json ./tyk 2>&1 | head -n 1
{"level":"info","msg":"Tyk API Gateway v5.3.0-dev","prefix":"main","time":"2024-07-10T15:16:14+02:00"}
# ./tyk 2>&1 | head -n 1
{"level":"info","msg":"Tyk API Gateway v5.3.0-dev","prefix":"main","time":"2024-07-10T15:45:02+02:00"}

The above confirms reading from env and from config.

Related Issue

Motivation and Context

The option to determine which STDOUT log format will open the opportunity for customers to easily parse the STDOUT logs and open up opportunity for our team to easily write tests and parse as needed.

How This Has Been Tested

  • Manual testing
  • Unit testing
  • Benchmarks added

PR Type

Enhancement, Tests


Description

  • Added the TYK_GW_LOGFORMAT Gateway config option to determine log format.
  • Implemented NewFormatter function to switch between JSON and Text log formats.
  • Modified log initialization to use the new formatter function.
  • Added unit tests to verify the correct formatter is used based on the input format.

Changes walkthrough 📝

Relevant files
Enhancement
log.go
Add log format configuration and initialization                   

log/log.go

  • Added NewFormatter function to handle log format based on
    TYK_GW_LOGFORMAT environment variable.
  • Modified the default log formatter initialization to use NewFormatter.

  • +17/-6   
    Tests
    log_test.go
    Add unit tests for log formatter configuration                     

    log/log_test.go

  • Added unit tests for NewFormatter function.
  • Tested JSON and Text formatters based on input format.
  • +61/-0   

    💡 PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    Copy link
    Contributor

    PR Reviewer Guide 🔍

    ⏱️ Estimated effort to review [1-5]

    2

    🧪 Relevant tests

    Yes

    🔒 Security concerns

    No

    ⚡ Key issues to review

    None

    Copy link
    Contributor

    github-actions bot commented Jun 13, 2024

    API Changes

    --- prev.txt	2024-09-05 10:52:10.917725882 +0000
    +++ current.txt	2024-09-05 10:52:07.753711925 +0000
    @@ -5633,6 +5633,10 @@
     	// If not set or left empty, it will default to `info`.
     	LogLevel string `json:"log_level"`
     
    +	// You can now configure the log format to be either the standard or json format
    +	// If not set or left empty, it will default to `standard`.
    +	LogFormat string `json:"log_format"`
    +
     	// Section for configuring OpenTracing support
     	// Deprecated: use OpenTelemetry instead.
     	Tracer Tracer `json:"tracing"`
    @@ -8554,8 +8558,6 @@
     
     func (gw *Gateway) InitHostCheckManager(ctx context.Context, store storage.Handler)
     
    -func (gw *Gateway) InitializeRPCCache()
    -
     func (gw *Gateway) LoadAPI(specs ...*APISpec) (out []*APISpec)
     
     func (gw *Gateway) LoadDefinitionsFromRPCBackup() ([]*APISpec, error)
    @@ -10857,25 +10859,57 @@
     FUNCTIONS
     
     func Get() *logrus.Logger
    +    Get returns the default configured logger.
    +
     func GetRaw() *logrus.Logger
    +    GetRaw is used internally. Should likely be removed first, do not rely on
    +    it.
    +
     func LoadTranslations(thing map[string]interface{})
         LoadTranslations takes a map[string]interface and flattens it to
    -    map[string]string Because translations have been loaded - we internally
    -    override log the formatter Nested entries are accessible using dot notation.
    -    example: `{"foo": {"bar": "baz"}}` flattened: `foo.bar: baz`
    +    map[string]string. Because translations have been loaded - we internally
    +    override log the formatter. Nested entries are accessible using dot
    +    notation.
    +
    +    Example: `{"foo": {"bar": "baz"}}` Flattened: `foo.bar: baz`
     
    +func NewFormatter(format string) logrus.Formatter
     
     TYPES
     
    +type JSONFormatter struct {
    +	// TimestampFormat sets the format used for marshaling timestamps.
    +	// The format to use is the same than for time.Format or time.Parse from the standard
    +	// library.
    +	// The standard Library already provides a set of predefined format.
    +	TimestampFormat string
    +
    +	// DisableTimestamp allows disabling automatic timestamps in output.
    +	DisableTimestamp bool
    +
    +	// DataKey allows users to put all the log entry parameters into a nested dictionary at a given key.
    +	DataKey string
    +}
    +    JSONFormatter formats logs into parsable json.
    +
    +func (f *JSONFormatter) Format(entry *logrus.Entry) ([]byte, error)
    +    Format renders a single log entry
    +
     type RawFormatter struct{}
    +    RawFormatter returns the logrus entry message as bytes.
     
     func (f *RawFormatter) Format(entry *logrus.Entry) ([]byte, error)
    +    Format returns the entry.Message as a []byte.
     
     type TranslationFormatter struct {
    -	*logrus.TextFormatter
    +	logrus.Formatter
     }
    +    TranslationFormatter handles message reformatting with translations.
     
     func (t *TranslationFormatter) Format(entry *logrus.Entry) ([]byte, error)
    +    Format will translate the log message based on the message code. This is a
    +    HTTP response code if provided. The message is usually just "Finished" for
    +    those cases, this would likely produce a better log message.
     
     # Package: ./regexp
     

    Copy link
    Contributor

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Score
    Error handling
    Add error handling for unsupported formats in NewFormatter

    Add error handling in the NewFormatter function to manage unsupported formats gracefully
    by logging an error or returning a default formatter with an error message.

    log/log.go [78-89]

     switch strings.ToLower(format) {
     case "json":
         return &logrus.JSONFormatter{
             TimestampFormat: time.RFC3339,
         }
    +case "":
    +    return &logrus.TextFormatter{
    +        TimestampFormat: "Jan 02 15:04:05",
    +        FullTimestamp:   true,
    +        DisableColors:   true,
    +    }
     default:
    +    log.Errorf("Unsupported format: %s", format)
         return &logrus.TextFormatter{
             TimestampFormat: "Jan 02 15:04:05",
             FullTimestamp:   true,
             DisableColors:   true,
         }
     
    Suggestion importance[1-10]: 10

    Why: Adding error handling for unsupported formats is crucial for robustness. It ensures that the application logs meaningful error messages and defaults to a known state, improving overall reliability and debuggability.

    10
    Enhancement
    Allow dynamic configuration of log formatter in init

    In the init function, replace the direct assignment to log.Formatter with a call to
    NewFormatter using an environment variable or a default value to allow dynamic
    configuration of the log formatter.

    log/log.go [54]

    -log.Formatter = NewFormatter("")
    +log.Formatter = NewFormatter(os.Getenv("LOG_FORMAT"))
     
    Suggestion importance[1-10]: 9

    Why: Allowing dynamic configuration of the log formatter via an environment variable enhances flexibility and adaptability of the logging configuration, making it more suitable for different environments without code changes.

    9
    Add explicit handling for empty string format in NewFormatter

    Consider adding a case for handling an empty string in the NewFormatter function to
    explicitly return a default formatter. This will improve code clarity and ensure that the
    default case is handled predictably.

    log/log.go [78-89]

     switch strings.ToLower(format) {
     case "json":
         return &logrus.JSONFormatter{
             TimestampFormat: time.RFC3339,
    +    }
    +case "":
    +    // Explicitly handle the default case
    +    return &logrus.TextFormatter{
    +        TimestampFormat: "Jan 02 15:04:05",
    +        FullTimestamp:   true,
    +        DisableColors:   true,
         }
     default:
         return &logrus.TextFormatter{
             TimestampFormat: "Jan 02 15:04:05",
             FullTimestamp:   true,
             DisableColors:   true,
         }
     
    Suggestion importance[1-10]: 7

    Why: This suggestion improves code clarity by explicitly handling the empty string case, making the code more readable and predictable. However, it does not introduce any functional changes since the default case already handles the empty string.

    7
    Maintainability
    Use a constant for the default timestamp format in NewFormatter

    Replace the hardcoded timestamp format in the default case of NewFormatter with a
    constant. This will centralize the management of timestamp formats and facilitate changes
    or configurations in the future.

    log/log.go [84-89]

    +const defaultTimestampFormat = "Jan 02 15:04:05"
     default:
         return &logrus.TextFormatter{
    -        TimestampFormat: "Jan 02 15:04:05",
    +        TimestampFormat: defaultTimestampFormat,
             FullTimestamp:   true,
             DisableColors:   true,
         }
     
    Suggestion importance[1-10]: 8

    Why: Using a constant for the timestamp format improves maintainability by centralizing the format definition, making future changes easier and reducing the risk of inconsistencies.

    8

    log/log.go Outdated Show resolved Hide resolved
    gateway/server.go Outdated Show resolved Hide resolved
    @titpetric titpetric changed the title added log format config, func and test cases [TT-12355] added log format config, func and test cases Jun 14, 2024
    gateway/server.go Outdated Show resolved Hide resolved
    @titpetric
    Copy link
    Contributor

    titpetric commented Jun 17, 2024

    I have covered the change with some benchmarks.

    # go test -count=1 -bench=. -benchtime=10s -benchmem ./...
    goos: linux
    goarch: amd64
    pkg: github.com/TykTechnologies/tyk/log
    cpu: 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz
    BenchmarkFormatter/json-8         	 3895482	      3086 ns/op	    2483 B/op	      34 allocs/op
    BenchmarkFormatter/json-ext-8     	 5285396	      2427 ns/op	    2076 B/op	      22 allocs/op
    BenchmarkFormatter/default-8      	 4405042	      2740 ns/op	    1793 B/op	      27 allocs/op
    BenchmarkFormatter/none-8         	12155498	      1079 ns/op	    1457 B/op	      12 allocs/op
    PASS
    ok  	github.com/TykTechnologies/tyk/log	59.213s
    

    This shows improved performance under json-ext over both the json and the default text formatting, increasing throughput from ~390K (json), ~440K (standard) to ~528K logging calls per second.

    @TykTechnologies TykTechnologies deleted a comment from github-actions bot Jun 17, 2024
    @TykTechnologies TykTechnologies deleted a comment from github-actions bot Jun 17, 2024
    @TykTechnologies TykTechnologies deleted a comment from github-actions bot Jun 17, 2024
    @TykTechnologies TykTechnologies deleted a comment from github-actions bot Jun 17, 2024
    @TykTechnologies TykTechnologies deleted a comment from github-actions bot Jun 17, 2024
    @TykTechnologies TykTechnologies deleted a comment from github-actions bot Jun 17, 2024
    @TykTechnologies TykTechnologies deleted a comment from github-actions bot Jun 17, 2024
    @TykTechnologies TykTechnologies deleted a comment from github-actions bot Jun 17, 2024
    @TykTechnologies TykTechnologies deleted a comment from github-actions bot Jun 17, 2024
    @TykTechnologies TykTechnologies deleted a comment from github-actions bot Jul 4, 2024
    @titpetric titpetric force-pushed the TT-12355/json_log_format branch 2 times, most recently from 9448ea9 to 1c83a47 Compare July 10, 2024 13:12
    Copy link

    sonarcloud bot commented Jul 10, 2024

    Quality Gate Failed Quality Gate failed

    Failed conditions
    47.8% Coverage on New Code (required ≥ 80%)
    C Reliability Rating on New Code (required ≥ A)

    See analysis details on SonarCloud

    Catch issues before they fail your Quality Gate with our IDE extension SonarLint

    Copy link

    sonarcloud bot commented Sep 5, 2024

    Quality Gate Failed Quality Gate failed

    Failed conditions
    47.8% Coverage on New Code (required ≥ 80%)
    C Reliability Rating on New Code (required ≥ A)

    See analysis details on SonarCloud

    Catch issues before they fail your Quality Gate with our IDE extension SonarLint

    @titpetric titpetric merged commit 63c26ed into master Sep 5, 2024
    26 of 27 checks passed
    @titpetric titpetric deleted the TT-12355/json_log_format branch September 5, 2024 11:14
    @titpetric
    Copy link
    Contributor

    /release to release-5.3

    Copy link

    tykbot bot commented Sep 5, 2024

    Working on it! Note that it can take a few minutes.

    tykbot bot pushed a commit that referenced this pull request Sep 5, 2024
    ### **FR Jira Ticket**
    <!-- Provide a general summary of your changes in the Title above -->
    
    https://tyktech.atlassian.net/browse/TT-12355
    
    ## Description
    
    - Added the `TYK_GW_LOGFORMAT` Gateway config option
    - The Tyk Gateway will determine which format should be used for STDOUT
    logs
    - If the `TYK_GW_LOGFORMAT` is set to `json` the Gateway will output
    logs in JSON format
    - if the `TYK_GW_LOGFORMAT` is set to `""` empty string or any other
    string value it will default the TEXT format
    
    Additionally, TYK_LOGFORMAT is supported, as is TYK_LOGLEVEL (and
    TYK_GW_LOGLEVEL).
    
    Note that there is some global use from the log package, I don't think
    we can set json output from json config, as it would be picked up too
    late. The one case to cover is to make sure this passes with only config
    enabled:
    
    ```
    # TYK_GW_LOGFORMAT=json ./tyk 2>&1 | head -n 1
    {"level":"info","msg":"Tyk API Gateway v5.3.0-dev","prefix":"main","time":"2024-07-10T15:16:11+02:00"}
    # TYK_LOGFORMAT=json ./tyk 2>&1 | head -n 1
    {"level":"info","msg":"Tyk API Gateway v5.3.0-dev","prefix":"main","time":"2024-07-10T15:16:14+02:00"}
    # ./tyk 2>&1 | head -n 1
    {"level":"info","msg":"Tyk API Gateway v5.3.0-dev","prefix":"main","time":"2024-07-10T15:45:02+02:00"}
    ```
    
    The above confirms reading from env and from config.
    
    ## Related Issue
    
    <!-- This project only accepts pull requests related to open issues. -->
    <!-- If suggesting a new feature or change, please discuss it in an
    issue first. -->
    <!-- If fixing a bug, there should be an issue describing it with steps
    to reproduce. -->
    <!-- OSS: Please link to the issue here. Tyk: please create/link the
    JIRA ticket. -->
    
    ## Motivation and Context
    The option to determine which STDOUT log format will open the
    opportunity for customers to easily parse the STDOUT logs and open up
    opportunity for our team to easily write tests and parse as needed.
    
    ## How This Has Been Tested
    
    - Manual testing
    - Unit testing 
    - Benchmarks added
    ___
    
    ### **PR Type**
    Enhancement, Tests
    
    
    ___
    
    ### **Description**
    - Added the `TYK_GW_LOGFORMAT` Gateway config option to determine log
    format.
    - Implemented `NewFormatter` function to switch between JSON and Text
    log formats.
    - Modified log initialization to use the new formatter function.
    - Added unit tests to verify the correct formatter is used based on the
    input format.
    
    
    ___
    
    
    
    ### **Changes walkthrough** 📝
    <table><thead><tr><th></th><th align="left">Relevant
    files</th></tr></thead><tbody><tr><td><strong>Enhancement
    </strong></td><td><table>
    <tr>
      <td>
        <details>
    <summary><strong>log.go</strong><dd><code>Add log format configuration
    and initialization</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
    <hr>
    
    log/log.go
    <li>Added <code>NewFormatter</code> function to handle log format based
    on <br><code>TYK_GW_LOGFORMAT</code> environment variable.<br> <li>
    Modified the default log formatter initialization to use
    <code>NewFormatter</code>.<br> <br>
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://github.com/TykTechnologies/tyk/pull/6344/files#diff-894630a7ed925c7768a861c4465bc9ad393f7937df7cac5c77ab123c03921aee">+17/-6</a>&nbsp;
    &nbsp; </td>
    </tr>                    
    </table></td></tr><tr><td><strong>Tests
    </strong></td><td><table>
    <tr>
      <td>
        <details>
    <summary><strong>log_test.go</strong><dd><code>Add unit tests for log
    formatter configuration</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
    <hr>
    
    log/log_test.go
    <li>Added unit tests for <code>NewFormatter</code> function.<br> <li>
    Tested JSON and Text formatters based on input format.<br>
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://github.com/TykTechnologies/tyk/pull/6344/files#diff-86c6c547a3e3c686a598e339acecbf5190185d424d96f9b9a0fff3d8513a90eb">+61/-0</a>&nbsp;
    &nbsp; </td>
    </tr>                    
    </table></td></tr></tr></tbody></table>
    
    ___
    
    > 💡 **PR-Agent usage**:
    >Comment `/help` on the PR to get a list of all available PR-Agent tools
    and their descriptions
    
    ---------
    
    Co-authored-by: Long Le <tyk-longle@Tyk-longle-MacBook-Pro.local>
    Co-authored-by: Tit Petric <tit@tyk.io>
    
    (cherry picked from commit 63c26ed)
    Copy link

    tykbot bot commented Sep 5, 2024

    @titpetric Succesfully merged PR

    buger added a commit that referenced this pull request Sep 5, 2024
    …test cases (#6344)
    
    [TT-12355] added log format config, func and test cases (#6344)
    
    ### **FR Jira Ticket**
    <!-- Provide a general summary of your changes in the Title above -->
    
    https://tyktech.atlassian.net/browse/TT-12355
    
    ## Description
    
    - Added the `TYK_GW_LOGFORMAT` Gateway config option
    - The Tyk Gateway will determine which format should be used for STDOUT
    logs
    - If the `TYK_GW_LOGFORMAT` is set to `json` the Gateway will output
    logs in JSON format
    - if the `TYK_GW_LOGFORMAT` is set to `""` empty string or any other
    string value it will default the TEXT format
    
    Additionally, TYK_LOGFORMAT is supported, as is TYK_LOGLEVEL (and
    TYK_GW_LOGLEVEL).
    
    Note that there is some global use from the log package, I don't think
    we can set json output from json config, as it would be picked up too
    late. The one case to cover is to make sure this passes with only config
    enabled:
    
    ```
    # TYK_GW_LOGFORMAT=json ./tyk 2>&1 | head -n 1
    {"level":"info","msg":"Tyk API Gateway v5.3.0-dev","prefix":"main","time":"2024-07-10T15:16:11+02:00"}
    # TYK_LOGFORMAT=json ./tyk 2>&1 | head -n 1
    {"level":"info","msg":"Tyk API Gateway v5.3.0-dev","prefix":"main","time":"2024-07-10T15:16:14+02:00"}
    # ./tyk 2>&1 | head -n 1
    {"level":"info","msg":"Tyk API Gateway v5.3.0-dev","prefix":"main","time":"2024-07-10T15:45:02+02:00"}
    ```
    
    The above confirms reading from env and from config.
    
    ## Related Issue
    
    <!-- This project only accepts pull requests related to open issues. -->
    <!-- If suggesting a new feature or change, please discuss it in an
    issue first. -->
    <!-- If fixing a bug, there should be an issue describing it with steps
    to reproduce. -->
    <!-- OSS: Please link to the issue here. Tyk: please create/link the
    JIRA ticket. -->
    
    ## Motivation and Context
    The option to determine which STDOUT log format will open the
    opportunity for customers to easily parse the STDOUT logs and open up
    opportunity for our team to easily write tests and parse as needed.
    
    ## How This Has Been Tested
    
    - Manual testing
    - Unit testing 
    - Benchmarks added
    ___
    
    ### **PR Type**
    Enhancement, Tests
    
    
    ___
    
    ### **Description**
    - Added the `TYK_GW_LOGFORMAT` Gateway config option to determine log
    format.
    - Implemented `NewFormatter` function to switch between JSON and Text
    log formats.
    - Modified log initialization to use the new formatter function.
    - Added unit tests to verify the correct formatter is used based on the
    input format.
    
    
    ___
    
    
    
    ### **Changes walkthrough** 📝
    <table><thead><tr><th></th><th align="left">Relevant
    files</th></tr></thead><tbody><tr><td><strong>Enhancement
    </strong></td><td><table>
    <tr>
      <td>
        <details>
    <summary><strong>log.go</strong><dd><code>Add log format configuration
    and initialization</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
    <hr>
    
    log/log.go
    <li>Added <code>NewFormatter</code> function to handle log format based
    on <br><code>TYK_GW_LOGFORMAT</code> environment variable.<br> <li>
    Modified the default log formatter initialization to use
    <code>NewFormatter</code>.<br> <br>
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://github.com/TykTechnologies/tyk/pull/6344/files#diff-894630a7ed925c7768a861c4465bc9ad393f7937df7cac5c77ab123c03921aee">+17/-6</a>&nbsp;
    &nbsp; </td>
    </tr>                    
    </table></td></tr><tr><td><strong>Tests
    </strong></td><td><table>
    <tr>
      <td>
        <details>
    <summary><strong>log_test.go</strong><dd><code>Add unit tests for log
    formatter configuration</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
    <hr>
    
    log/log_test.go
    <li>Added unit tests for <code>NewFormatter</code> function.<br> <li>
    Tested JSON and Text formatters based on input format.<br>
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://github.com/TykTechnologies/tyk/pull/6344/files#diff-86c6c547a3e3c686a598e339acecbf5190185d424d96f9b9a0fff3d8513a90eb">+61/-0</a>&nbsp;
    &nbsp; </td>
    </tr>                    
    </table></td></tr></tr></tbody></table>
    
    ___
    
    > 💡 **PR-Agent usage**:
    >Comment `/help` on the PR to get a list of all available PR-Agent tools
    and their descriptions
    
    ---------
    
    Co-authored-by: Long Le <tyk-longle@Tyk-longle-MacBook-Pro.local>
    Co-authored-by: Tit Petric <tit@tyk.io>
    titpetric added a commit that referenced this pull request Sep 5, 2024
    …unc and test cases (#6344)" (#6485)
    
    ### **User description**
    Reverts #6484
    
    
    ___
    
    ### **PR Type**
    enhancement, bug fix
    
    
    ___
    
    ### **Description**
    - Removed the `LogFormat` configuration option from the codebase and
    related schema.
    - Refactored and renamed initialization functions in the gateway server
    code.
    - Simplified log formatter setup by removing the JSONFormatter and
    related functionality.
    - Removed the `github.com/goccy/go-json` dependency from the project.
    
    
    ___
    
    
    
    ### **Changes walkthrough** 📝
    <table><thead><tr><th></th><th align="left">Relevant
    files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
    <tr>
      <td>
        <details>
    <summary><strong>config.go</strong><dd><code>Remove LogFormat
    configuration option</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
    <hr>
    
    config/config.go
    
    - Removed the `LogFormat` configuration option.
    
    
    
    </details>
    
    
      </td>
    <td><a
    href="https://github.com/TykTechnologies/tyk/pull/6485/files#diff-fe44f09c4d5977b5f5eaea29170b6a0748819c9d02271746a20d81a5f3efca17">+0/-4</a>&nbsp;
    &nbsp; &nbsp; </td>
    
    </tr>                    
    
    <tr>
      <td>
        <details>
    <summary><strong>server.go</strong><dd><code>Refactor and rename
    initialization functions</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
    <hr>
    
    gateway/server.go
    
    <li>Renamed <code>initRPCCache</code> to
    <code>InitializeRPCCache</code>.<br> <li> Renamed
    <code>initSystem</code> to <code>initialiseSystem</code>.<br> <li>
    Removed log format initialization.<br>
    
    
    </details>
    
    
      </td>
    <td><a
    href="https://github.com/TykTechnologies/tyk/pull/6485/files#diff-4652d1bf175a0be8f5e61ef7177c9666f23e077d8626b73ac9d13358fa8b525b">+21/-31</a>&nbsp;
    </td>
    
    </tr>                    
    
    <tr>
      <td>
        <details>
    <summary><strong>testutil.go</strong><dd><code>Update test setup
    function name</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    </dd></summary>
    <hr>
    
    gateway/testutil.go
    
    - Renamed `initSystem` to `initialiseSystem` in test setup.
    
    
    
    </details>
    
    
      </td>
    <td><a
    href="https://github.com/TykTechnologies/tyk/pull/6485/files#diff-7aaf6ae49fb8f58a8c99d337fedd15b3e430dd928ed547e425ef429b10d28ce8">+1/-1</a>&nbsp;
    &nbsp; &nbsp; </td>
    
    </tr>                    
    
    <tr>
      <td>
        <details>
    <summary><strong>log.go</strong><dd><code>Simplify log formatter setup
    and remove JSONFormatter</code>&nbsp; &nbsp; &nbsp; &nbsp;
    </dd></summary>
    <hr>
    
    log/log.go
    
    <li>Removed JSONFormatter and related functionality.<br> <li> Simplified
    log formatter setup.<br>
    
    
    </details>
    
    
      </td>
    <td><a
    href="https://github.com/TykTechnologies/tyk/pull/6485/files#diff-894630a7ed925c7768a861c4465bc9ad393f7937df7cac5c77ab123c03921aee">+43/-59</a>&nbsp;
    </td>
    
    </tr>                    
    </table></td></tr><tr><td><strong>Configuration
    changes</strong></td><td><table>
    <tr>
      <td>
        <details>
    <summary><strong>schema.json</strong><dd><code>Remove log_format option
    from schema</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
    <hr>
    
    cli/linter/schema.json
    
    - Removed `log_format` configuration option from schema.
    
    
    
    </details>
    
    
      </td>
    <td><a
    href="https://github.com/TykTechnologies/tyk/pull/6485/files#diff-103cec746d3e61d391c5a67c171963f66fea65d651d704d5540e60aa5d574f46">+0/-4</a>&nbsp;
    &nbsp; &nbsp; </td>
    
    </tr>                    
    </table></td></tr><tr><td><strong>Dependencies</strong></td><td><table>
    <tr>
      <td>
        <details>
    <summary><strong>go.mod</strong><dd><code>Remove go-json
    dependency</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
    <hr>
    
    go.mod
    
    - Removed dependency on `github.com/goccy/go-json`.
    
    
    
    </details>
    
    
      </td>
    <td><a
    href="https://github.com/TykTechnologies/tyk/pull/6485/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6">+0/-1</a>&nbsp;
    &nbsp; &nbsp; </td>
    
    </tr>                    
    
    <tr>
      <td>
        <details>
    <summary><strong>go.sum</strong><dd><code>Remove go-json
    checksums</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
    <hr>
    
    go.sum
    
    - Removed checksums for `github.com/goccy/go-json`.
    
    
    
    </details>
    
    
      </td>
    <td><a
    href="https://github.com/TykTechnologies/tyk/pull/6485/files#diff-3295df7234525439d778f1b282d146a4f1ff6b415248aaac074e8042d9f42d63">+0/-2</a>&nbsp;
    &nbsp; &nbsp; </td>
    
    </tr>                    
    </table></td></tr></tr></tbody></table>
    
    ___
    
    > 💡 **PR-Agent usage**:
    >Comment `/help` on the PR to get a list of all available PR-Agent tools
    and their descriptions
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    3 participants