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

--terse support #156

Open
nirik opened this issue Apr 12, 2019 · 6 comments
Open

--terse support #156

nirik opened this issue Apr 12, 2019 · 6 comments
Labels
enhancement New feature or request

Comments

@nirik
Copy link
Member

nirik commented Apr 12, 2019

Right now the default/docs version of the public consumer just prints out all of each message to stdout. This is nice, but it would be nice if there was something like fedmsg --terse where it just prints out a small subset to give you an idea of the message. This way you can see a lot more info, and can actually run it to watch what all is going on in fedora.

~ fedmsg-tail-3 --terse
[2019-04-11 17:32:02][fedmsg.crypto.utils INFO] Downloading x509 certificate from https://fedoraproject.org/fedmsg/ca.crt
[2019-04-11 17:32:03][fedmsg.crypto.utils INFO] Downloading x509 certificate from https://fedoraproject.org/fedmsg/crl.pem
[2019-04-11 17:32:03][fedmsg.commands INFO]
logger.odcs.internal.msg --
[2019-04-11 17:32:03][fedmsg.commands INFO]
github.pull_request_review -- xiexingguo approved the changes on PR #27523 on ceph/ceph ceph/ceph#27523 (review)
[2019-04-11 17:32:25][fedmsg.commands INFO]
buildsys.task.state.change -- koschei's scratch build of cinnamon-session-4.0.0-2.fc30.src.rpm for f31 started http://koji.fedoraproject.org/koji/taskinfo?taskID=34120079

@jeremycline
Copy link
Member

This is pretty easy to do and could be a callback we provide, but the way fedmsg "tersified" messages was fedora_fedmsg_meta_something_something and fedora-messaging relies on publishers to describe their messages so it'll look a bit messy during the transition since the generic terse message is just the message topic IIRC.

The callback would look something like:

def callback(message):
    print(message.summary)

@jeremycline jeremycline added enhancement New feature or request EasyFix Good for newcomers labels Apr 15, 2019
@abompard
Copy link
Member

When applications define message schemas, we'll be able to define a printer callback that will print
"{} --{}".format(message.topic, message.summary)
and it'll output basically the same info.
Without message schemas, the conversion from dictionary to human-readable description is not possible (all that logic is in the fedmsg_meta_fedora_infrastructure package).

Hopefully apps will define their message schemas soon!

@abompard
Copy link
Member

Oh, synchronized replies, @jeremycline :-)

@joshpetit
Copy link

Hey! Is this something that there's still an interest in having? I could try and implement it if so!

@Ayesh-07
Copy link

Currently, the default/docs version of the public consumer simply prints out all of each message to stdout. While this is helpful, it would be more efficient to have an option like fedmsg --terse that prints out a smaller subset of the message. This would allow users to see more information and observe what is happening in Fedora more effectively.~ fedmsg-tail-3 --terse
[2019-04-11 17:32:02][fedmsg.crypto.utils INFO] Downloading x509 certificate from https://fedoraproject.org/fedmsg/ca.crt
[2019-04-11 17:32:03][fedmsg.crypto.utils INFO] Downloading x509 certificate from https://fedoraproject.org/fedmsg/crl.pem
[2019-04-11 17:32:03][fedmsg.commands INFO]
logger.odcs.internal.msg --
[2019-04-11 17:32:03][fedmsg.commands INFO]
github.pull_request_review -- xiexingguo approved the changes on PR #27523 on ceph/ceph ceph/ceph#27523 (review)
[2019-04-11 17:32:25][fedmsg.commands INFO]
buildsys.task.state.change -- koschei's scratch build of cinnamon-session-4.0.0-2.fc30.src.rpm for f31 started http://koji.fedoraproject.org/koji/taskinfo?taskID=34120079

When applications define message schemas, a printer callback can be defined to print {} --{}. This way, the output will be similar but more efficient. However, without message schemas, converting from a dictionary to a human-readable description is not possible, as all that logic is in the fedmsg_meta_fedora_infrastructure package.

It is hoped that apps will define their message schemas soon!

@anshikavashistha
Copy link

anshikavashistha commented Mar 18, 2024

@nirik @abompard If noone is working on it,may I work on this issue?

@jeremycline jeremycline removed the EasyFix Good for newcomers label Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants