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

Introduce activity logger configuration for the server #508

Open
wants to merge 3 commits into
base: master
from

Conversation

@kachayev
Copy link
Collaborator

kachayev commented May 4, 2019

API looks the same way it looks for clients. :log-activity param includes LoggingHandler as a top-level handler.

To track operations on each child channels we still need to use pipeline-transform, I'm still not sure how to distinguish the two: maybe :child-log-activity? "Child" might be confusing as this term from Netty was never exposed before. :handler-log-activity?... even more confusing. As a simple workaround, we can set the same logger both for server and handlers. Less flexibility but that's probably what you need when debugging. @ztellman WDYT?

user=> (def s (http/start-server (fn [_] {:status 200}) {:port 2020 :log-activity :warn}))
#'user/s
[aleph-netty-server-event-pool-1] WARN aleph-server - [id: 0xe168e395] REGISTERED
[aleph-netty-server-event-pool-1] WARN aleph-server - [id: 0xe168e395] BIND: 0.0.0.0/0.0.0.0:2020
[aleph-netty-server-event-pool-1] WARN aleph-server - [id: 0xe168e395, L:/0:0:0:0:0:0:0:0:2020] ACTIVE
[aleph-netty-server-event-pool-1] WARN aleph-server - [id: 0xe168e395, L:/0:0:0:0:0:0:0:0:2020] READ: [id: 0x0c71398b, L:/0:0:0:0:0:0:0:1:2020 - R:/0:0:0:0:0:0:0:1:54059]
[aleph-netty-server-event-pool-1] WARN aleph-server - [id: 0xe168e395, L:/0:0:0:0:0:0:0:0:2020] READ COMPLETE

P.S. This PR obviously conflicts with a few previous changes, e.g. Kqueue. Publishing this earlier not to lose once again :)

@ztellman ztellman added the approved label May 14, 2019
@ztellman

This comment has been minimized.

Copy link
Owner

ztellman commented May 14, 2019

Approved, pending conflicts being resolved.

@kachayev

This comment has been minimized.

Copy link
Collaborator Author

kachayev commented May 19, 2019

@ztellman Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.