Does scribe currently support this feature? If not, does anyone have any ideas how it could be accomplished?
Is it possible to assign multiple categories to a message? Essentially, I want to be able to send a given message to multiple locations. The message should only be generated once. Currently, I'm testing by going through the examples and using scribe_cat. I want to be able to do something like....
echo "test" | ./scribe_cat -h localhost:1464 cat1,cat2
The message should end up in both final locations as described in the conf file for cat1 and cat2. One possibility is to have it go to cat1, then as I intend for cat1 to be a file, to feed the contents of cat1 to cat2 somehow, but it seems like there should be a better way.
Scribe only supports a single category per message. But all you would need to do is log the message multiple times with each category you want.
scribe_cat is an example script to show you one way of sending a message to scribe. You can either call scribe_cat multiple times, or you can simply edit this script to support sending multiple messages when passed multiple categories.
Anthony, thanks for responding so quickly. I decided to go ahead and incorporate multiple-category sending into the client side. I'm doing exactly as you recommend: log the message and send to each category.
As it turns out, there is a scribe-native way to achieve what I wanted to achieve. I wanted to send a message to multiple destinations, thinking that each destination should be tied to one category and that scribe might then parse the categories and send the message off each. I'm making use of the store type of "multi" to achieve this result.
Essentially, the store of type category contains multiple stores, and the message gets routed to each store. This seems to work pretty smoothly, and it provides better performance than sending the message multiple times to scribe through an external script. In this example, each message is being sent across the network to cc101 and also written to a local file in /var/elbert.
The config file is pasted below.
Ah, ok. Now that I understand what you are trying to do, there is actually a simple solution,
You can just create 2 separate stores for the same category (without even needing to use a multistore). The only drawback is that you can only do this if you give the full category name (ie you can't currently have multiple 'default' or "prefix*" stores).
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.