mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-04-18 14:24:56 +00:00
feat(lib): add log filtering rules
Closes #942 Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
@@ -120,6 +120,14 @@ func New(opts Options) (*Server, error) {
|
||||
logger: opts.Logger,
|
||||
}
|
||||
|
||||
if opts.Policy.Logging != nil {
|
||||
var err error
|
||||
result.logger, err = opts.Policy.ApplyLogFilters(opts.Logger)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("can't create log filters: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
mux := http.NewServeMux()
|
||||
xess.Mount(mux)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user