mirror of
https://github.com/appy-one/acebase.git
synced 2026-05-25 06:02:14 -06:00
[GH-ISSUE #134] Logging API support? #75
Labels
No labels
IndexedDB
browser
bug
dependencies
documentation
duplicate
enhancement
feature request
indexes
indexes
invalid
pull-request
query
question
transaction logging
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/acebase#75
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @SilentAntenna on GitHub (Aug 7, 2022).
Original GitHub issue: https://github.com/appy-one/acebase/issues/134
Originally assigned to: @appy-one on GitHub.
It would be nice if Acebase could provide a logging callback or a logging event. In this way, we may use libraries like
log4jsto save the logs for future inspection.@appy-one commented on GitHub (Aug 15, 2022):
Thanks for your input, I'll see what I can do! 👍🏼
@Azarattum commented on GitHub (Nov 27, 2022):
I agree that it would be extremely useful. Currently AceBase uses
DebugLoggerfromacebase-corewhich does all the logging stuff. I suggest to add an option toacebase,acebase-clientandacebase-serverfor providing your ownDebugLoggercompatible implementation. So it could look like:Note, that your don't specify the log level here as you are handling all the levels yourself. If an override for a level is not specified, it will not be logged. @appy-one, let me know if you want me to work on PR for this. I guess we'll have to modify all the
core,server,clientand this package for it to work consistently.@SilentAntenna if you need a workaround right now, you can write this before instantiating your AceBase client/server:
With this hack you can override the
DebugLoggerbehavior with your implementation. Note, that you have to specify an empty function forsetLevel, otherwise your custom behavior will be overwritten upon initialization.@appy-one commented on GitHub (Nov 28, 2022):
I think this a pretty good workaround proposed by @Azarattum