Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Logging support #8

Open
gcao opened this Issue · 0 comments

1 participant

@gcao
Owner

Add logging support

Logger levels: error, warn, info, debug, trace

Logger level defaults to info
Logger level can be set through environment variable (e.g. ASPECTOR_LOG_LEVEL=warn+TestAspect/debug)
Logger level can be set programatically
Logger level can be set per Aspect class (or even instance?)
After an aspect is applied, changing logger level has no effect
Warn on using raw advices (warnings can be disabled by setting that aspect's logger level to error)

We can save indexes of advices and simply refer them as "advice 1 (BEFORE)"

Log example

Aspector | INFO | TestAspect | define-advice |
Aspector | DEBUG | TestAspect | before-apply-to | A
Aspector | INFO | TestAspect | apply-to | A
Aspector | DEBUG | TestAspect | after-apply-to | A
Aspector | DEBUG | TestAspect | before-apply-to-method | A |
Aspector | DEBUG | TestAspect | apply-to-method | A | |
Aspector | DEBUG | TestAspect | after-apply-to-method | A |
Aspector | DEBUG | TestAspect | invoke-method | A |
Aspector | DEBUG | TestAspect | invoke-advice | A | |

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.