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

Logging SPI for various logging libraries #757

Closed
shxz130 opened this issue May 13, 2019 · 7 comments
Closed

Logging SPI for various logging libraries #757

shxz130 opened this issue May 13, 2019 · 7 comments
Labels
area/logging Issues or PRs related to logging of Sentinel kind/feature Category issues or prs related to feature request.

Comments

@shxz130
Copy link
Contributor

shxz130 commented May 13, 2019

the log is bad implement by write String to assign log file,cannot we use slf4j or other implements such as we support event(EventBus or SpringApplicationEvent) to log,
is it more scalable?zhe sentinel‘s user can feel comfortable。

such as:
EventBus.post(LogEvent log);

new Listener(){
doLog(){
log.info();
}
}

@sczyh30 sczyh30 added the kind/discussion For further discussion label May 13, 2019
@sczyh30
Copy link
Member

sczyh30 commented May 13, 2019

Sentinel is a fundamental component so sentinel-core should not depend on any third-party logging libraries (which might bring dependency conflict).

Maybe we can make the logging interface as SPI and provide different implementations (based on JUL or slf4j). Discussions are welcomed.

@shxz130
Copy link
Contributor Author

shxz130 commented May 14, 2019

i'm every agree to support making the logging interface as SPI and provide different implementations

@sczyh30 sczyh30 added the area/logging Issues or PRs related to logging of Sentinel label May 31, 2019
@sczyh30 sczyh30 changed the title about the Sentinel's log Logging SPI for various logging libraries Jun 13, 2019
@Warkeeper
Copy link

I think Logging SPI is pretty important since I find it's impossible to control the size and the count of log file "sentinel-block.log","sentinel-record.log" and "command-center.log".(They are all hard coded in codes)

@sczyh30
Copy link
Member

sczyh30 commented Nov 14, 2019

I think Logging SPI is pretty important since I find it's impossible to control the size and the count of log file "sentinel-block.log", "sentinel-record.log" and "command-center.log".(They are all hardcoded in codes)

This can be improved. We might need more configuration items to control the different logs (e.g. record log, metric log and block log). For logging SPI we need more discussion (whether to support and how to support). @cdfive @jasonjoo2010 @linlinisme Any suggestions?

@jasonjoo2010
Copy link
Collaborator

Indeed it's a meaningful feature for most users. We can provide it as an SPI protocol and make several implementations in separated modules including slf4j/log4j/jcl logging system forwarder, standard console output, etc.

Certainly it will also enable users to implement it themselves.

@goudai
Copy link

goudai commented Nov 18, 2019

能否支持采用slf4j做日志记录框架API?

@sczyh30
Copy link
Member

sczyh30 commented Mar 16, 2020

Since the logger SPI has been introduced via #1265 and #1338, we may implement extension modules for popular logging libraries. Contributions are welcomed!

Umbrella issue: #1295

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/logging Issues or PRs related to logging of Sentinel kind/feature Category issues or prs related to feature request.
Projects
None yet
Development

No branches or pull requests

5 participants