Prachi
Prachi

Reputation: 570

Can user provided services be shared across multiple apps

I am creating a logdrain service in Bluemix for my apps:

`cf cups myapps-logdrain -l <logdrain-endpoint>`

Can I bind the myapp-logdrain service to multiple apps at a time? I looked at the cloudfoundry documentation and played with the logdrain service from cf cli. Its settings don't specify whether or not it can be shared.

Upvotes: 0

Views: 68

Answers (2)

vmovva
vmovva

Reputation: 681

Yes. Log drain service(user provided service) can be shared just like any other service.

You can differentiate logs from different applications by querying for application GUID and/or instance number.

You may see logs similar to following format:

[Date][log-service-name][application guid][app-instance-number][log-message]

Apr 21 00:35:44 bluemixlogs 3398064b-8de6-46dd-egf1-0dde35546496/[App/0]: sending logs to 3rd party service : some log info

Upvotes: 2

user152468
user152468

Reputation: 3242

In general user defined services in cloudfoundry can be shared across multiple apps. They are usually just configuration data that tell your app how it can connect to some other application or service.

Yet I have nod specific knowledge about the logdrain service.

Upvotes: 0

Related Questions