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

Update README files #69

Merged
merged 19 commits into from
Oct 5, 2023
Merged

Update README files #69

merged 19 commits into from
Oct 5, 2023

Conversation

yevhenii-nadtochii
Copy link
Collaborator

@yevhenii-nadtochii yevhenii-nadtochii commented Oct 3, 2023

This PR updates README files.

The following modules have been updated:

  • Root README.
  • tests/logging-smoke-test
  • logging-fake-backend
  • logging-context
  • logging-backend
  • logging
  • flogger

I've renamed Module.md to README.md because README files are rendered by GitHub even if they are in nested directories.


Possible actions:

  1. We don't have slf4j backend, and after repackaging we are incompatible with Flogger's one. We should either create an issue to add this backend or remove two test modules that use this backend.
  2. There are several types under io.spine.testing.logging package in tests/fixtures module. And we also have io.spine.logging.testing in testutil-logging. Earlier, we decided to go with the latter option.
  3. Rename logging-fake-backend to backends/jvm-dynamic-backend. We don't need "logging" prefix because this module is not published. Also, I'm not sure whether to extract captureLogData() to a separate module. It feels so, but I haven't come up with a module name.
  4. Remove SimpleLoggerBackend. We have our own default backend (StdLoggerBackend), so Flogger's one can be removed.
  5. Can we get rid of logging prefix in module names? We use it for published modules, and it starts to pollute modules hierarchy with long names. Maybe spinePublihsing{} can do it for us.
  6. Bump Gradle. It freezes too often, up to ten times per working day. I hope they enhanced Kotlin Multiplatform support in Gradle 8+.
  7. We have lost the automatic pickup of the default backend when hid Flogger (Remove deprecated Logging interface #62). Putting of spine-logging on the classpath doesn't lead to the console output anymore. It leads to an error. We also have to put logging-backend explicitly.

@yevhenii-nadtochii yevhenii-nadtochii self-assigned this Oct 3, 2023
@codecov
Copy link

codecov bot commented Oct 3, 2023

Codecov Report

Merging #69 (2cd0001) into master (3a2ba61) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff            @@
##             master      #69   +/-   ##
=========================================
  Coverage     62.40%   62.40%           
  Complexity      821      821           
=========================================
  Files           119      119           
  Lines          3809     3809           
  Branches        512      512           
=========================================
  Hits           2377     2377           
  Misses         1228     1228           
  Partials        204      204           

@yevhenii-nadtochii yevhenii-nadtochii marked this pull request as ready for review October 4, 2023 08:43
@yevhenii-nadtochii
Copy link
Collaborator Author

@armiol @alexander-yevsyukov PTAL

And let's discuss next steps after review of this PR.

Copy link
Contributor

@armiol armiol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yevhenii-nadtochii Mostly LGTM. See my comments though.

Also, please gather us with @alexander-yevsyukov to discuss the points you have raised in the PR description.

The following services may be injected:

| Service | Default |
|-----------------------|---|
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's format the table borders to fit the right edge here and in the following lines.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IDEA Markdown plugin can do it automatically.


This module contains Flogger [sources][flogger-github] built with Gradle.
This directory contains Flogger [modules][flogger-github] built with Gradle.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to speak about repackaging we performed somewhere. This file seems to be a proper place.

Copy link
Contributor

@alexander-yevsyukov alexander-yevsyukov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see my comments.

README.md Outdated
the current request.
A logging context refers to a set of attributes that are attached to all log
records while a context is installed. For instance, you can attach a user ID
to all log records for the current request.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The last sentence probably deserves a code snippet. But I don't insist at the moment.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, I've decided to add a snippet because it's unclear how to use custom contexts. There's no example anywhere.

BTW, I've not tried them before.

It works, but there are several suggestions: #70, #71, #72.

check(logged[0].literalArgument == message)
```

To use it, add this backend to `implementation` configuration instead of `runtimeOnly`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it testImplementation, unless we do test fixtures?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyway a code example would be helpful here too.

@yevhenii-nadtochii
Copy link
Collaborator Author

@armiol @alexander-yevsyukov PTAL

Copy link
Contributor

@armiol armiol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yevhenii-nadtochii LGTM with a minor suggestion.

README.md Outdated
```kotlin
val handler = RequestHandler()
with(handler) {
handle(Request(action = "create", user = "Maks"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Max"?

Copy link
Contributor

@alexander-yevsyukov alexander-yevsyukov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alexander-yevsyukov alexander-yevsyukov merged commit 84d9a9b into master Oct 5, 2023
7 checks passed
@alexander-yevsyukov alexander-yevsyukov deleted the update-readme branch October 5, 2023 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants