X Tutup
Skip to content

WIP: PSR-3 compatible Logger#1438

Closed
tvdijen wants to merge 7 commits intomasterfrom
logger
Closed

WIP: PSR-3 compatible Logger#1438
tvdijen wants to merge 7 commits intomasterfrom
logger

Conversation

@tvdijen
Copy link
Member

@tvdijen tvdijen commented Mar 11, 2021

This checks some of the boxes in #371:

  • Extract the log levels definition from \SimpleSAML\Logger and use the ones defined by Psr\Log\LogLevel instead.
  • Add a $context parameter to all the methods defined by Psr\Log\LoggerInterface.
  • Make the \SimpleSAML\Logger class extend Psr\Log\AbstractLogger.
  • Make the \SimpleSAML\Logger::log() method public and make it throw a \Psr\Log\InvalidArgumentException if the log level is unknown.

@codecov
Copy link

codecov bot commented Mar 11, 2021

Codecov Report

Merging #1438 (bfaeb14) into master (7a1d8e6) will decrease coverage by 6.96%.
The diff coverage is 33.33%.

❗ Current head bfaeb14 differs from pull request most recent head aa21c42. Consider uploading reports for the commit aa21c42 to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1438      +/-   ##
============================================
- Coverage     45.48%   38.53%   -6.96%     
+ Complexity     3692     3482     -210     
============================================
  Files           158      139      -19     
  Lines         12292    10373    -1919     
============================================
- Hits           5591     3997    -1594     
+ Misses         6701     6376     -325     

@tvdijen tvdijen force-pushed the master branch 2 times, most recently from 08ebb9c to 64fca25 Compare July 2, 2021 14:12
@tvdijen tvdijen force-pushed the logger branch 4 times, most recently from 8c7e372 to 88a231b Compare August 28, 2021 20:39
@tvdijen tvdijen changed the title Replace LogLevel ints with strings WIP: PSR-3 compatible Logger Aug 28, 2021
@tvdijen tvdijen force-pushed the logger branch 5 times, most recently from 83c78e6 to f3eea7b Compare August 29, 2021 15:53
@tvdijen tvdijen force-pushed the master branch 2 times, most recently from 7a53fc8 to d73ae47 Compare September 26, 2021 13:03
@tvdijen tvdijen force-pushed the master branch 2 times, most recently from e5c0e21 to d5616df Compare January 9, 2022 11:00
@tvdijen tvdijen force-pushed the master branch 3 times, most recently from 2e6ab04 to 32f9acc Compare November 23, 2022 18:24
@tvdijen tvdijen force-pushed the master branch 6 times, most recently from 7e3ea19 to 2523634 Compare January 5, 2023 16:31
@tvdijen tvdijen force-pushed the master branch 13 times, most recently from 5b84489 to e632526 Compare March 19, 2023 21:10
@tvdijen tvdijen added this to the 3.0 milestone Mar 21, 2023
@tvdijen tvdijen force-pushed the master branch 2 times, most recently from 8ac729b to a16cf6e Compare April 25, 2023 08:33
@tvdijen tvdijen force-pushed the master branch 2 times, most recently from fc454de to 7ac76ae Compare May 3, 2023 08:31
@tvdijen tvdijen force-pushed the master branch 6 times, most recently from 29f7b69 to 1a911ce Compare May 12, 2023 16:07
@tvdijen tvdijen force-pushed the master branch 3 times, most recently from c7c8357 to fdbe001 Compare June 12, 2023 14:28
@monkeyiq
Copy link
Contributor

I started looking into this and #371

Another option these days is to use the Symfony logging
https://symfony.com/doc/current/logging.html

I am still looking at if trying to use the injection stuff might help. I have a little example of using the monolog to back the logs but it might make sense to use the Symfony logging so we can slot in whatever we want there and SSP is somewhat shielded from it.

OTOH if we gain enough to invest the time into this right now or focus on other enhancements and 3.x first.

I mainly got here looking at some of the older PRs.

@tvdijen
Copy link
Member Author

tvdijen commented Mar 10, 2026

I'm all in favour of using symfony for this!
Once we release 2.5, I want to force-push that to master and store the current master-branch in a backup-branch. Then we can start working on this on a new 3.0 branch

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.

2 participants

X Tutup